From 0c415f1de62efb9bd2fba950379372f74b09ac21 Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Wed, 6 May 2026 14:13:23 +0000 Subject: [PATCH 1/3] Configurations: 'specification/chaos/resource-manager/Microsoft.Chaos/Chaos/tspconfig.yaml', API Version: 2026-05-01-preview, SDK Release Type: beta, and CommitSHA: '84d40416fbb3d2416cb7abe7ec82e63c76832963' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6258086 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. --- .../azure-resourcemanager-chaos/CHANGELOG.md | 341 ++- .../azure-resourcemanager-chaos/README.md | 4 +- .../azure-resourcemanager-chaos/SAMPLE.md | 1279 +++++++++++- sdk/chaos/azure-resourcemanager-chaos/pom.xml | 4 +- .../resourcemanager/chaos/ChaosManager.java | 129 ++ .../chaos/fluent/ActionVersionsClient.java | 78 + .../chaos/fluent/ActionsClient.java | 70 + .../chaos/fluent/ChaosManagementClient.java | 56 + .../fluent/DiscoveredResourcesClient.java | 75 + .../chaos/fluent/PrivateAccessesClient.java | 447 ++++ .../fluent/ScenarioConfigurationsClient.java | 388 ++++ .../chaos/fluent/ScenarioRunsClient.java | 111 + .../chaos/fluent/ScenariosClient.java | 136 ++ .../chaos/fluent/WorkspacesClient.java | 328 +++ .../chaos/fluent/models/ActionInner.java | 228 ++ .../chaos/fluent/models/ActionProperties.java | 208 ++ .../fluent/models/ActionVersionInner.java | 228 ++ .../chaos/fluent/models/CapabilityInner.java | 11 + .../fluent/models/CapabilityProperties.java | 19 + .../models/DiscoveredResourceInner.java | 144 ++ .../ExperimentExecutionDetailsInner.java | 10 + .../ExperimentExecutionDetailsProperties.java | 18 + .../models/ExperimentExecutionInner.java | 10 + .../models/ExperimentExecutionProperties.java | 18 + .../chaos/fluent/models/ExperimentInner.java | 26 + .../fluent/models/ExperimentProperties.java | 32 + .../fluent/models/PrivateAccessInner.java | 181 ++ .../PrivateEndpointConnectionInner.java | 146 ++ .../PrivateLinkResourceListResultInner.java | 97 + .../models/ScenarioConfigurationInner.java | 156 ++ .../chaos/fluent/models/ScenarioInner.java | 155 ++ .../chaos/fluent/models/ScenarioRunInner.java | 144 ++ .../chaos/fluent/models/WorkspaceInner.java | 210 ++ .../chaos/implementation/ActionImpl.java | 95 + .../implementation/ActionVersionImpl.java | 95 + .../ActionVersionsClientImpl.java | 388 ++++ .../implementation/ActionVersionsImpl.java | 66 + .../implementation/ActionsClientImpl.java | 363 ++++ .../chaos/implementation/ActionsImpl.java | 61 + .../chaos/implementation/CapabilityImpl.java | 5 + .../ChaosManagementClientImpl.java | 130 +- .../DiscoveredResourceImpl.java | 50 + .../DiscoveredResourcesClientImpl.java | 366 ++++ .../DiscoveredResourcesImpl.java | 68 + .../ExperimentExecutionDetailsImpl.java | 5 + .../ExperimentExecutionImpl.java | 5 + .../chaos/implementation/ExperimentImpl.java | 10 + .../implementation/PrivateAccessImpl.java | 176 ++ .../PrivateAccessesClientImpl.java | 1830 +++++++++++++++++ .../implementation/PrivateAccessesImpl.java | 213 ++ .../PrivateEndpointConnectionImpl.java | 50 + .../PrivateLinkResourceListResultImpl.java | 44 + .../ScenarioConfigurationImpl.java | 174 ++ .../ScenarioConfigurationsClientImpl.java | 1410 +++++++++++++ .../ScenarioConfigurationsImpl.java | 221 ++ .../chaos/implementation/ScenarioImpl.java | 132 ++ .../chaos/implementation/ScenarioRunImpl.java | 49 + .../ScenarioRunsClientImpl.java | 471 +++++ .../implementation/ScenarioRunsImpl.java | 82 + .../implementation/ScenariosClientImpl.java | 551 +++++ .../chaos/implementation/ScenariosImpl.java | 152 ++ .../chaos/implementation/WorkspaceImpl.java | 200 ++ .../implementation/WorkspacesClientImpl.java | 1322 ++++++++++++ .../chaos/implementation/WorkspacesImpl.java | 152 ++ .../models/ActionListResult.java | 95 + .../models/ActionVersionListResult.java | 95 + .../models/DiscoveredResourceListResult.java | 96 + .../models/PrivateAccessListResult.java | 95 + .../PrivateEndpointConnectionListResult.java | 98 + .../ScenarioConfigurationListResult.java | 97 + .../models/ScenarioListResult.java | 95 + .../models/ScenarioRunListResult.java | 95 + .../models/WorkspaceListResult.java | 95 + .../resourcemanager/chaos/models/Action.java | 112 + .../chaos/models/ActionDependency.java | 145 ++ .../chaos/models/ActionDependencyType.java | 46 + .../chaos/models/ActionKind.java | 56 + .../chaos/models/ActionLifecycle.java | 71 + .../ActionPropertiesParametersSchema.java | 56 + .../models/ActionSupportedTargetType.java | 94 + .../chaos/models/ActionVersion.java | 112 + .../chaos/models/ActionVersions.java | 69 + .../resourcemanager/chaos/models/Actions.java | 63 + .../chaos/models/Capability.java | 8 + .../chaos/models/ConfigurationExclusions.java | 146 ++ .../chaos/models/ConfigurationFilters.java | 203 ++ .../models/CustomerDataStorageProperties.java | 116 ++ .../chaos/models/DiscoveredResource.java | 55 + .../models/DiscoveredResourceProperties.java | 157 ++ .../chaos/models/DiscoveredResources.java | 67 + .../chaos/models/EntraIdentity.java | 90 + .../chaos/models/Experiment.java | 26 +- .../chaos/models/ExperimentExecution.java | 7 + .../models/ExperimentExecutionDetails.java | 7 + .../chaos/models/ExternalResource.java | 85 + .../models/FixResourcePermissionsRequest.java | 86 + .../chaos/models/KeyValuePair.java | 2 +- .../chaos/models/OperationError.java | 92 + .../chaos/models/ParameterType.java | 66 + .../chaos/models/PermissionError.java | 142 ++ .../chaos/models/PermissionsFix.java | 143 ++ .../models/PermissionsFixProperties.java | 161 ++ .../chaos/models/PermissionsFixState.java | 71 + .../chaos/models/PermissionsFixSummary.java | 122 ++ .../models/PhysicalToLogicalZoneMapping.java | 92 + .../chaos/models/PrivateAccess.java | 252 +++ .../chaos/models/PrivateAccessPatch.java | 87 + .../chaos/models/PrivateAccessProperties.java | 125 ++ .../chaos/models/PrivateAccesses.java | 283 +++ .../chaos/models/PrivateEndpoint.java | 73 + .../models/PrivateEndpointConnection.java | 55 + .../PrivateEndpointConnectionProperties.java | 131 ++ ...rivateEndpointServiceConnectionStatus.java | 57 + .../chaos/models/PrivateLinkResource.java | 151 ++ .../models/PrivateLinkResourceListResult.java | 34 + .../models/PrivateLinkResourceProperties.java | 128 ++ .../PrivateLinkServiceConnectionState.java | 112 + .../chaos/models/ProvisioningState.java | 5 + .../models/PublicNetworkAccessOption.java | 51 + .../chaos/models/Recommendation.java | 94 + .../chaos/models/RecommendationStatus.java | 71 + .../chaos/models/ResourceStateError.java | 122 ++ .../chaos/models/RoleAssignmentError.java | 90 + .../chaos/models/RoleAssignmentResult.java | 186 ++ .../chaos/models/RoleAssignmentStatus.java | 61 + .../chaos/models/RunAfter.java | 116 ++ .../chaos/models/RunAfterBehavior.java | 56 + .../chaos/models/Scenario.java | 189 ++ .../chaos/models/ScenarioAction.java | 317 +++ .../chaos/models/ScenarioConfiguration.java | 250 +++ .../ScenarioConfigurationProperties.java | 194 ++ .../chaos/models/ScenarioConfigurations.java | 245 +++ .../ScenarioConfigurationsExecuteHeaders.java | 59 + ...ScenarioConfigurationsExecuteResponse.java | 29 + .../chaos/models/ScenarioErrors.java | 128 ++ .../models/ScenarioEvaluationResultItem.java | 94 + .../chaos/models/ScenarioParameter.java | 198 ++ .../chaos/models/ScenarioProperties.java | 210 ++ .../chaos/models/ScenarioRun.java | 55 + .../chaos/models/ScenarioRunProperties.java | 280 +++ .../chaos/models/ScenarioRunResource.java | 74 + .../chaos/models/ScenarioRunState.java | 106 + .../models/ScenarioRunSummaryAction.java | 145 ++ .../chaos/models/ScenarioRuns.java | 101 + .../models/ScenarioRunsCancelHeaders.java | 59 + .../models/ScenarioRunsCancelResponse.java | 28 + .../chaos/models/ScenarioRunsGetHeaders.java | 59 + .../chaos/models/ScenarioRunsGetResponse.java | 39 + .../chaos/models/ScenarioSummaryState.java | 91 + .../chaos/models/ScenarioValidationState.java | 83 + .../chaos/models/Scenarios.java | 147 ++ .../chaos/models/Validation.java | 143 ++ .../chaos/models/ValidationProperties.java | 163 ++ .../chaos/models/Workspace.java | 305 +++ .../chaos/models/WorkspaceEvaluation.java | 143 ++ .../models/WorkspaceEvaluationProperties.java | 249 +++ .../models/WorkspaceEvaluationStatus.java | 76 + .../chaos/models/WorkspaceProperties.java | 122 ++ .../chaos/models/WorkspaceUpdate.java | 115 ++ .../chaos/models/Workspaces.java | 184 ++ .../chaos/models/ZoneResolutionInfo.java | 126 ++ .../chaos/models/ZoneResolutionMapping.java | 93 + .../chaos/models/ZoneResolutionMode.java | 52 + .../azure-resourcemanager-chaos_metadata.json | 2 +- .../proxy-config.json | 2 +- .../generated/ActionVersionsGetSamples.java | 23 + .../generated/ActionVersionsListSamples.java | 22 + .../chaos/generated/ActionsGetSamples.java | 22 + .../chaos/generated/ActionsListSamples.java | 22 + .../CapabilitiesCreateOrUpdateSamples.java | 2 +- .../generated/CapabilitiesDeleteSamples.java | 2 +- .../generated/CapabilitiesGetSamples.java | 2 +- .../generated/CapabilitiesListSamples.java | 2 +- .../generated/CapabilityTypesGetSamples.java | 2 +- .../generated/CapabilityTypesListSamples.java | 2 +- .../DiscoveredResourcesGetSamples.java | 24 + ...overedResourcesListByWorkspaceSamples.java | 24 + .../generated/ExperimentsCancelSamples.java | 2 +- .../ExperimentsCreateOrUpdateSamples.java | 6 +- .../generated/ExperimentsDeleteSamples.java | 2 +- .../ExperimentsExecutionDetailsSamples.java | 2 +- .../ExperimentsGetByResourceGroupSamples.java | 2 +- .../ExperimentsGetExecutionSamples.java | 2 +- .../ExperimentsListAllExecutionsSamples.java | 2 +- ...ExperimentsListByResourceGroupSamples.java | 2 +- .../generated/ExperimentsListSamples.java | 2 +- .../generated/ExperimentsStartSamples.java | 2 +- .../generated/ExperimentsUpdateSamples.java | 2 +- .../OperationStatusesGetSamples.java | 2 +- .../PrivateAccessesCreateOrUpdateSamples.java | 50 + ...leteAPrivateEndpointConnectionSamples.java | 25 + .../PrivateAccessesDeleteSamples.java | 22 + ...sGetAPrivateEndpointConnectionSamples.java | 25 + ...vateAccessesGetByResourceGroupSamples.java | 38 + ...ccessesGetPrivateLinkResourcesSamples.java | 25 + ...ateAccessesListByResourceGroupSamples.java | 22 + ...ListPrivateEndpointConnectionsSamples.java | 24 + .../generated/PrivateAccessesListSamples.java | 22 + .../PrivateAccessesUpdateSamples.java | 41 + ...ioConfigurationsCreateOrUpdateSamples.java | 66 + .../ScenarioConfigurationsDeleteSamples.java | 24 + .../ScenarioConfigurationsExecuteSamples.java | 25 + ...urationsFixResourcePermissionsSamples.java | 25 + .../ScenarioConfigurationsGetSamples.java | 24 + .../ScenarioConfigurationsListAllSamples.java | 24 + ...ScenarioConfigurationsValidateSamples.java | 24 + .../generated/ScenarioRunsCancelSamples.java | 24 + .../generated/ScenarioRunsGetSamples.java | 24 + .../generated/ScenarioRunsListAllSamples.java | 24 + .../ScenariosCreateOrUpdateSamples.java | 83 + .../generated/ScenariosDeleteSamples.java | 24 + .../chaos/generated/ScenariosGetSamples.java | 23 + .../generated/ScenariosListAllSamples.java | 22 + .../generated/TargetTypesGetSamples.java | 2 +- .../generated/TargetTypesListSamples.java | 2 +- .../TargetsCreateOrUpdateSamples.java | 2 +- .../chaos/generated/TargetsDeleteSamples.java | 2 +- .../chaos/generated/TargetsGetSamples.java | 2 +- .../chaos/generated/TargetsListSamples.java | 2 +- .../WorkspacesCreateOrUpdateSamples.java | 53 + .../generated/WorkspacesDeleteSamples.java | 22 + .../WorkspacesGetByResourceGroupSamples.java | 23 + .../WorkspacesListByResourceGroupSamples.java | 22 + .../generated/WorkspacesListSamples.java | 22 + ...rkspacesRefreshRecommendationsSamples.java | 23 + .../generated/WorkspacesUpdateSamples.java | 50 + .../generated/ActionDependencyTests.java | 34 + .../chaos/generated/ActionInnerTests.java | 17 + .../generated/ActionListResultTests.java | 19 + ...ActionPropertiesParametersSchemaTests.java | 16 + .../generated/ActionPropertiesTests.java | 17 + .../ActionSupportedTargetTypeTests.java | 20 + .../generated/ActionVersionInnerTests.java | 17 + .../ActionVersionListResultTests.java | 19 + ...ctionVersionsGetWithResponseMockTests.java | 37 + .../ActionVersionsListMockTests.java | 37 + .../ActionsGetWithResponseMockTests.java | 36 + .../chaos/generated/ActionsListMockTests.java | 37 + ...esCreateOrUpdateWithResponseMockTests.java | 6 +- ...pabilitiesDeleteWithResponseMockTests.java | 4 +- .../CapabilitiesGetWithResponseMockTests.java | 6 +- .../generated/CapabilitiesListMockTests.java | 4 +- .../chaos/generated/CapabilityInnerTests.java | 2 +- .../generated/CapabilityListResultTests.java | 4 +- .../generated/CapabilityPropertiesTests.java | 2 +- .../generated/CapabilityTypeInnerTests.java | 2 +- .../CapabilityTypeListResultTests.java | 4 +- ...yTypePropertiesRuntimePropertiesTests.java | 4 +- .../CapabilityTypePropertiesTests.java | 2 +- ...pabilityTypesGetWithResponseMockTests.java | 4 +- .../CapabilityTypesListMockTests.java | 4 +- .../generated/ChaosExperimentActionTests.java | 8 +- .../generated/ChaosExperimentBranchTests.java | 19 +- .../generated/ChaosExperimentStepTests.java | 29 +- .../ChaosTargetListSelectorTests.java | 22 +- .../ChaosTargetQuerySelectorTests.java | 20 +- .../generated/ChaosTargetSelectorTests.java | 12 +- ...haosTargetSimpleFilterParametersTests.java | 9 +- .../ChaosTargetSimpleFilterTests.java | 11 +- .../generated/ConfigurationFiltersTests.java | 34 + .../CustomerDataStoragePropertiesTests.java | 30 + .../chaos/generated/DelayActionTests.java | 12 +- .../DiscoveredResourceInnerTests.java | 17 + .../DiscoveredResourceListResultTests.java | 19 + .../DiscoveredResourcePropertiesTests.java | 17 + ...eredResourcesGetWithResponseMockTests.java | 37 + ...eredResourcesListByWorkspaceMockTests.java | 37 + .../chaos/generated/EntraIdentityTests.java | 16 + .../ExperimentExecutionDetailsInnerTests.java | 2 +- ...nDetailsPropertiesRunInformationTests.java | 2 +- ...rimentExecutionDetailsPropertiesTests.java | 2 +- .../ExperimentExecutionInnerTests.java | 2 +- .../ExperimentExecutionListResultTests.java | 4 +- .../ExperimentExecutionPropertiesTests.java | 2 +- .../chaos/generated/ExperimentInnerTests.java | 133 +- .../generated/ExperimentListResultTests.java | 18 +- .../generated/ExperimentPropertiesTests.java | 56 +- .../generated/ExperimentUpdateTests.java | 18 +- .../ExperimentsCreateOrUpdateMockTests.java | 65 +- ...ExecutionDetailsWithResponseMockTests.java | 4 +- ...tByResourceGroupWithResponseMockTests.java | 16 +- ...entsGetExecutionWithResponseMockTests.java | 4 +- ...ExperimentsListAllExecutionsMockTests.java | 6 +- ...perimentsListByResourceGroupMockTests.java | 22 +- .../generated/ExperimentsListMockTests.java | 21 +- .../generated/ExternalResourceTests.java | 25 + .../FixResourcePermissionsRequestTests.java | 25 + .../generated/OperationDisplayTests.java | 2 +- .../chaos/generated/OperationInnerTests.java | 2 +- .../generated/OperationListResultTests.java | 4 +- .../chaos/generated/PermissionErrorTests.java | 17 + .../generated/PermissionsFixSummaryTests.java | 18 + .../PhysicalToLogicalZoneMappingTests.java | 17 + .../generated/PrivateAccessInnerTests.java | 48 + .../PrivateAccessListResultTests.java | 24 + .../generated/PrivateAccessPatchTests.java | 39 + .../PrivateAccessPropertiesTests.java | 28 + ...rivateAccessesCreateOrUpdateMockTests.java | 62 + ...dpointConnectionWithResponseMockTests.java | 44 + ...tByResourceGroupWithResponseMockTests.java | 42 + ...ateLinkResourcesWithResponseMockTests.java | 42 + ...eAccessesListByResourceGroupMockTests.java | 43 + .../PrivateAccessesListMockTests.java | 43 + ...stPrivateEndpointConnectionsMockTests.java | 45 + .../PrivateEndpointConnectionInnerTests.java | 24 + ...vateEndpointConnectionListResultTests.java | 26 + ...vateEndpointConnectionPropertiesTests.java | 23 + .../chaos/generated/PrivateEndpointTests.java | 15 + ...ivateLinkResourceListResultInnerTests.java | 22 + .../PrivateLinkResourcePropertiesTests.java | 19 + .../generated/PrivateLinkResourceTests.java | 21 + ...rivateLinkServiceConnectionStateTests.java | 22 + .../chaos/generated/RecommendationTests.java | 18 + .../generated/ResourceIdentityTests.java | 12 +- .../chaos/generated/RunAfterTests.java | 50 + ...gurationsExecuteWithResponseMockTests.java | 35 + .../ScenarioEvaluationResultItemTests.java | 21 + .../generated/ScenarioParameterTests.java | 39 + .../generated/ScenarioRunResourceTests.java | 15 + .../ScenarioRunSummaryActionTests.java | 17 + ...enarioRunsCancelWithResponseMockTests.java | 34 + .../ScenariosDeleteWithResponseMockTests.java | 34 + .../chaos/generated/StepStatusTests.java | 2 +- .../chaos/generated/TargetInnerTests.java | 12 +- .../generated/TargetListResultTests.java | 6 +- .../chaos/generated/TargetReferenceTests.java | 8 +- .../chaos/generated/TargetTypeInnerTests.java | 2 +- .../generated/TargetTypeListResultTests.java | 4 +- .../generated/TargetTypePropertiesTests.java | 2 +- .../TargetTypesGetWithResponseMockTests.java | 4 +- .../generated/TargetTypesListMockTests.java | 4 +- ...tsCreateOrUpdateWithResponseMockTests.java | 16 +- .../TargetsDeleteWithResponseMockTests.java | 2 +- .../TargetsGetWithResponseMockTests.java | 7 +- .../chaos/generated/TargetsListMockTests.java | 6 +- .../generated/UserAssignedIdentityTests.java | 5 +- .../chaos/generated/WorkspaceInnerTests.java | 57 + .../generated/WorkspaceListResultTests.java | 24 + .../generated/WorkspacePropertiesTests.java | 28 + .../chaos/generated/WorkspaceUpdateTests.java | 50 + .../WorkspacesCreateOrUpdateMockTests.java | 68 + ...tByResourceGroupWithResponseMockTests.java | 43 + ...orkspacesListByResourceGroupMockTests.java | 43 + .../generated/WorkspacesListMockTests.java | 42 + .../generated/ZoneResolutionInfoTests.java | 17 + .../generated/ZoneResolutionMappingTests.java | 17 + .../tsp-location.yaml | 2 +- 347 files changed, 28622 insertions(+), 427 deletions(-) create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ActionVersionsClient.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ActionsClient.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/DiscoveredResourcesClient.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/PrivateAccessesClient.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ScenarioConfigurationsClient.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ScenarioRunsClient.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ScenariosClient.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/WorkspacesClient.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ActionInner.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ActionProperties.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ActionVersionInner.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/DiscoveredResourceInner.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/PrivateAccessInner.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/PrivateEndpointConnectionInner.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/PrivateLinkResourceListResultInner.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ScenarioConfigurationInner.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ScenarioInner.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ScenarioRunInner.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/WorkspaceInner.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ActionImpl.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ActionVersionImpl.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ActionVersionsClientImpl.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ActionVersionsImpl.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ActionsClientImpl.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ActionsImpl.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/DiscoveredResourceImpl.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/DiscoveredResourcesClientImpl.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/DiscoveredResourcesImpl.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/PrivateAccessImpl.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/PrivateAccessesClientImpl.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/PrivateAccessesImpl.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/PrivateEndpointConnectionImpl.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/PrivateLinkResourceListResultImpl.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioConfigurationImpl.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioConfigurationsClientImpl.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioConfigurationsImpl.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioImpl.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioRunImpl.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioRunsClientImpl.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioRunsImpl.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenariosClientImpl.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenariosImpl.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/WorkspaceImpl.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/WorkspacesClientImpl.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/WorkspacesImpl.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/ActionListResult.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/ActionVersionListResult.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/DiscoveredResourceListResult.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/PrivateAccessListResult.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/PrivateEndpointConnectionListResult.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/ScenarioConfigurationListResult.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/ScenarioListResult.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/ScenarioRunListResult.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/WorkspaceListResult.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Action.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionDependency.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionDependencyType.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionKind.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionLifecycle.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionPropertiesParametersSchema.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionSupportedTargetType.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionVersion.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionVersions.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Actions.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ConfigurationExclusions.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ConfigurationFilters.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/CustomerDataStorageProperties.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/DiscoveredResource.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/DiscoveredResourceProperties.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/DiscoveredResources.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/EntraIdentity.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ExternalResource.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/FixResourcePermissionsRequest.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/OperationError.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ParameterType.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PermissionError.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PermissionsFix.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PermissionsFixProperties.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PermissionsFixState.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PermissionsFixSummary.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PhysicalToLogicalZoneMapping.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateAccess.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateAccessPatch.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateAccessProperties.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateAccesses.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateEndpoint.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateEndpointConnection.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateEndpointConnectionProperties.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateEndpointServiceConnectionStatus.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateLinkResource.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateLinkResourceListResult.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateLinkResourceProperties.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateLinkServiceConnectionState.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PublicNetworkAccessOption.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Recommendation.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/RecommendationStatus.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ResourceStateError.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/RoleAssignmentError.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/RoleAssignmentResult.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/RoleAssignmentStatus.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/RunAfter.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/RunAfterBehavior.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Scenario.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioAction.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioConfiguration.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioConfigurationProperties.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioConfigurations.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioConfigurationsExecuteHeaders.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioConfigurationsExecuteResponse.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioErrors.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioEvaluationResultItem.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioParameter.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioProperties.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRun.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunProperties.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunResource.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunState.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunSummaryAction.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRuns.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunsCancelHeaders.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunsCancelResponse.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunsGetHeaders.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunsGetResponse.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioSummaryState.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioValidationState.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Scenarios.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Validation.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ValidationProperties.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Workspace.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/WorkspaceEvaluation.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/WorkspaceEvaluationProperties.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/WorkspaceEvaluationStatus.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/WorkspaceProperties.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/WorkspaceUpdate.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Workspaces.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ZoneResolutionInfo.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ZoneResolutionMapping.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ZoneResolutionMode.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ActionVersionsGetSamples.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ActionVersionsListSamples.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ActionsGetSamples.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ActionsListSamples.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/DiscoveredResourcesGetSamples.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/DiscoveredResourcesListByWorkspaceSamples.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesCreateOrUpdateSamples.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesDeleteAPrivateEndpointConnectionSamples.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesDeleteSamples.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesGetAPrivateEndpointConnectionSamples.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesGetByResourceGroupSamples.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesGetPrivateLinkResourcesSamples.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesListByResourceGroupSamples.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesListPrivateEndpointConnectionsSamples.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesListSamples.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesUpdateSamples.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsCreateOrUpdateSamples.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsDeleteSamples.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsExecuteSamples.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsFixResourcePermissionsSamples.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsGetSamples.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsListAllSamples.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsValidateSamples.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioRunsCancelSamples.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioRunsGetSamples.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioRunsListAllSamples.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenariosCreateOrUpdateSamples.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenariosDeleteSamples.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenariosGetSamples.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenariosListAllSamples.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/WorkspacesCreateOrUpdateSamples.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/WorkspacesDeleteSamples.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/WorkspacesGetByResourceGroupSamples.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/WorkspacesListByResourceGroupSamples.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/WorkspacesListSamples.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/WorkspacesRefreshRecommendationsSamples.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/WorkspacesUpdateSamples.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionDependencyTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionInnerTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionListResultTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionPropertiesParametersSchemaTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionPropertiesTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionSupportedTargetTypeTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionVersionInnerTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionVersionListResultTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionVersionsGetWithResponseMockTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionVersionsListMockTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionsGetWithResponseMockTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionsListMockTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ConfigurationFiltersTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CustomerDataStoragePropertiesTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/DiscoveredResourceInnerTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/DiscoveredResourceListResultTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/DiscoveredResourcePropertiesTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/DiscoveredResourcesGetWithResponseMockTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/DiscoveredResourcesListByWorkspaceMockTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/EntraIdentityTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExternalResourceTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/FixResourcePermissionsRequestTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PermissionErrorTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PermissionsFixSummaryTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PhysicalToLogicalZoneMappingTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessInnerTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessListResultTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessPatchTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessPropertiesTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesCreateOrUpdateMockTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesGetAPrivateEndpointConnectionWithResponseMockTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesGetByResourceGroupWithResponseMockTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesGetPrivateLinkResourcesWithResponseMockTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesListByResourceGroupMockTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesListMockTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesListPrivateEndpointConnectionsMockTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateEndpointConnectionInnerTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateEndpointConnectionListResultTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateEndpointConnectionPropertiesTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateEndpointTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateLinkResourceListResultInnerTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateLinkResourcePropertiesTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateLinkResourceTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateLinkServiceConnectionStateTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/RecommendationTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/RunAfterTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsExecuteWithResponseMockTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ScenarioEvaluationResultItemTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ScenarioParameterTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ScenarioRunResourceTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ScenarioRunSummaryActionTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ScenarioRunsCancelWithResponseMockTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ScenariosDeleteWithResponseMockTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspaceInnerTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspaceListResultTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspacePropertiesTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspaceUpdateTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspacesCreateOrUpdateMockTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspacesGetByResourceGroupWithResponseMockTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspacesListByResourceGroupMockTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspacesListMockTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ZoneResolutionInfoTests.java create mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ZoneResolutionMappingTests.java diff --git a/sdk/chaos/azure-resourcemanager-chaos/CHANGELOG.md b/sdk/chaos/azure-resourcemanager-chaos/CHANGELOG.md index 774da2fa2eee..2148954702f4 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/CHANGELOG.md +++ b/sdk/chaos/azure-resourcemanager-chaos/CHANGELOG.md @@ -1,14 +1,347 @@ # Release History -## 1.4.0-beta.1 (Unreleased) +## 1.4.0-beta.1 (2026-05-06) -### Features Added +- Azure Resource Manager Chaos client library for Java. This package contains Microsoft Azure SDK for Chaos Management SDK. Chaos Management Client. Package api-version 2026-05-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Breaking Changes -### Bugs Fixed +#### `models.ChaosTargetListSelector` was modified + +* `validate()` was removed + +#### `models.OperationDisplay` was modified + +* `validate()` was removed + +#### `models.ChaosTargetSimpleFilterParameters` was modified + +* `validate()` was removed + +#### `models.ResourceIdentity` was modified + +* `validate()` was removed + +#### `models.ContinuousAction` was modified + +* `validate()` was removed + +#### `models.ChaosExperimentBranch` was modified + +* `validate()` was removed + +#### `models.ChaosExperimentStep` was modified + +* `validate()` was removed + +#### `models.ChaosExperimentAction` was modified + +* `validate()` was removed + +#### `models.DiscreteAction` was modified + +* `validate()` was removed + +#### `models.ActionStatus` was modified + +* `validate()` was removed + +#### `models.ExperimentExecutionActionTargetDetailsProperties` was modified + +* `validate()` was removed + +#### `models.ExperimentUpdate` was modified + +* `validate()` was removed + +#### `models.UserAssignedIdentity` was modified + +* `validate()` was removed + +#### `models.DelayAction` was modified + +* `validate()` was removed + +#### `models.ChaosTargetQuerySelector` was modified + +* `validate()` was removed + +#### `models.ExperimentExecutionDetailsPropertiesRunInformation` was modified + +* `validate()` was removed + +#### `models.StepStatus` was modified + +* `validate()` was removed + +#### `models.CapabilityTypePropertiesRuntimeProperties` was modified + +* `validate()` was removed + +#### `models.ExperimentExecutionActionTargetDetailsError` was modified + +* `validate()` was removed + +#### `models.KeyValuePair` was modified + +* `validate()` was removed + +#### `models.ChaosTargetFilter` was modified + +* `validate()` was removed + +#### `models.ChaosTargetSimpleFilter` was modified + +* `validate()` was removed + +#### `models.BranchStatus` was modified + +* `validate()` was removed + +#### `models.ChaosTargetSelector` was modified + +* `validate()` was removed + +#### `models.TargetReference` was modified + +* `validate()` was removed + +### Features Added + +* `models.ScenarioConfigurationProperties` was added + +* `models.ScenarioRunsGetHeaders` was added + +* `models.ScenarioRuns` was added + +* `models.ConfigurationExclusions` was added + +* `models.PrivateAccessProperties` was added + +* `models.PrivateEndpointConnectionProperties` was added + +* `models.ResourceStateError` was added + +* `models.PrivateAccess` was added + +* `models.ScenarioRun` was added + +* `models.RunAfterBehavior` was added + +* `models.ActionSupportedTargetType` was added + +* `models.ScenarioConfigurationsExecuteResponse` was added + +* `models.ActionLifecycle` was added + +* `models.PrivateEndpointConnection` was added + +* `models.Scenarios` was added + +* `models.PrivateEndpointServiceConnectionStatus` was added + +* `models.ScenarioRunsCancelResponse` was added + +* `models.ScenarioProperties` was added + +* `models.ScenarioRunProperties` was added + +* `models.ScenarioParameter` was added + +* `models.ExternalResource` was added + +* `models.ActionDependencyType` was added + +* `models.Scenario$DefinitionStages` was added + +* `models.ScenarioEvaluationResultItem` was added + +* `models.RecommendationStatus` was added + +* `models.ScenarioRunsGetResponse` was added + +* `models.CustomerDataStorageProperties` was added + +* `models.ParameterType` was added + +* `models.EntraIdentity` was added + +* `models.PrivateLinkResource` was added + +* `models.WorkspaceEvaluationProperties` was added + +* `models.FixResourcePermissionsRequest` was added + +* `models.PermissionsFixSummary` was added + +* `models.PrivateAccess$Update` was added + +* `models.ZoneResolutionInfo` was added + +* `models.ScenarioErrors` was added + +* `models.DiscoveredResources` was added + +* `models.PermissionsFix` was added + +* `models.WorkspaceProperties` was added + +* `models.RoleAssignmentStatus` was added + +* `models.Workspace$Update` was added + +* `models.Workspace$Definition` was added + +* `models.PublicNetworkAccessOption` was added + +* `models.ActionDependency` was added + +* `models.PermissionError` was added + +* `models.ZoneResolutionMode` was added + +* `models.Recommendation` was added + +* `models.Validation` was added + +* `models.ConfigurationFilters` was added + +* `models.WorkspaceEvaluationStatus` was added + +* `models.ScenarioConfiguration` was added + +* `models.Scenario$UpdateStages` was added + +* `models.PrivateAccessPatch` was added + +* `models.PrivateAccess$DefinitionStages` was added + +* `models.Workspace` was added + +* `models.ScenarioConfiguration$UpdateStages` was added + +* `models.Actions` was added + +* `models.PermissionsFixState` was added + +* `models.ActionPropertiesParametersSchema` was added + +* `models.PrivateLinkResourceProperties` was added + +* `models.Scenario` was added + +* `models.PrivateAccess$Definition` was added + +* `models.PrivateLinkServiceConnectionState` was added + +* `models.ScenarioSummaryState` was added + +* `models.RoleAssignmentError` was added + +* `models.ScenarioConfiguration$Definition` was added + +* `models.PrivateEndpoint` was added + +* `models.DiscoveredResourceProperties` was added + +* `models.Action` was added + +* `models.ScenarioRunResource` was added + +* `models.ScenarioAction` was added + +* `models.ValidationProperties` was added + +* `models.Workspace$DefinitionStages` was added + +* `models.PrivateAccess$UpdateStages` was added + +* `models.ZoneResolutionMapping` was added + +* `models.ScenarioConfiguration$DefinitionStages` was added + +* `models.WorkspaceUpdate` was added + +* `models.OperationError` was added + +* `models.PrivateAccesses` was added + +* `models.PhysicalToLogicalZoneMapping` was added + +* `models.ActionVersion` was added + +* `models.ActionVersions` was added + +* `models.PrivateLinkResourceListResult` was added + +* `models.Scenario$Update` was added + +* `models.PermissionsFixProperties` was added + +* `models.ActionKind` was added + +* `models.WorkspaceEvaluation` was added + +* `models.DiscoveredResource` was added + +* `models.Workspaces` was added + +* `models.ScenarioValidationState` was added + +* `models.Scenario$Definition` was added + +* `models.ScenarioConfiguration$Update` was added + +* `models.ScenarioConfigurations` was added + +* `models.ScenarioRunsCancelHeaders` was added + +* `models.ScenarioRunState` was added + +* `models.ScenarioRunSummaryAction` was added + +* `models.Workspace$UpdateStages` was added + +* `models.RoleAssignmentResult` was added + +* `models.ScenarioConfigurationsExecuteHeaders` was added + +* `models.RunAfter` was added + +#### `models.ExperimentExecution` was modified + +* `provisioningState()` was added + +#### `models.ProvisioningState` was modified + +* `RUNNING` was added + +#### `models.Experiment` was modified + +* `customerDataStorage()` was added + +#### `models.ExperimentExecutionDetails` was modified + +* `provisioningState()` was added + +#### `models.Experiment$Definition` was modified + +* `withCustomerDataStorage(models.CustomerDataStorageProperties)` was added + +#### `models.Capability` was modified + +* `provisioningState()` was added + +#### `ChaosManager` was modified -### Other Changes +* `scenarioConfigurations()` was added +* `actionVersions()` was added +* `discoveredResources()` was added +* `privateAccesses()` was added +* `actions()` was added +* `scenarios()` was added +* `workspaces()` was added +* `scenarioRuns()` was added ## 1.3.0 (2025-05-15) diff --git a/sdk/chaos/azure-resourcemanager-chaos/README.md b/sdk/chaos/azure-resourcemanager-chaos/README.md index 00b098673d41..6d3b774864bb 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. 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 api-version 2026-05-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-chaos - 1.3.0 + 1.4.0-beta.1 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/chaos/azure-resourcemanager-chaos/SAMPLE.md b/sdk/chaos/azure-resourcemanager-chaos/SAMPLE.md index 3a22ed926441..6056cba6962a 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/SAMPLE.md +++ b/sdk/chaos/azure-resourcemanager-chaos/SAMPLE.md @@ -1,6 +1,16 @@ # Code snippets and samples +## ActionVersions + +- [Get](#actionversions_get) +- [List](#actionversions_list) + +## Actions + +- [Get](#actions_get) +- [List](#actions_list) + ## Capabilities - [CreateOrUpdate](#capabilities_createorupdate) @@ -13,6 +23,11 @@ - [Get](#capabilitytypes_get) - [List](#capabilitytypes_list) +## DiscoveredResources + +- [Get](#discoveredresources_get) +- [ListByWorkspace](#discoveredresources_listbyworkspace) + ## Experiments - [Cancel](#experiments_cancel) @@ -31,6 +46,42 @@ - [Get](#operationstatuses_get) +## PrivateAccesses + +- [CreateOrUpdate](#privateaccesses_createorupdate) +- [Delete](#privateaccesses_delete) +- [DeleteAPrivateEndpointConnection](#privateaccesses_deleteaprivateendpointconnection) +- [GetAPrivateEndpointConnection](#privateaccesses_getaprivateendpointconnection) +- [GetByResourceGroup](#privateaccesses_getbyresourcegroup) +- [GetPrivateLinkResources](#privateaccesses_getprivatelinkresources) +- [List](#privateaccesses_list) +- [ListByResourceGroup](#privateaccesses_listbyresourcegroup) +- [ListPrivateEndpointConnections](#privateaccesses_listprivateendpointconnections) +- [Update](#privateaccesses_update) + +## ScenarioConfigurations + +- [CreateOrUpdate](#scenarioconfigurations_createorupdate) +- [Delete](#scenarioconfigurations_delete) +- [Execute](#scenarioconfigurations_execute) +- [FixResourcePermissions](#scenarioconfigurations_fixresourcepermissions) +- [Get](#scenarioconfigurations_get) +- [ListAll](#scenarioconfigurations_listall) +- [Validate](#scenarioconfigurations_validate) + +## ScenarioRuns + +- [Cancel](#scenarioruns_cancel) +- [Get](#scenarioruns_get) +- [ListAll](#scenarioruns_listall) + +## Scenarios + +- [CreateOrUpdate](#scenarios_createorupdate) +- [Delete](#scenarios_delete) +- [Get](#scenarios_get) +- [ListAll](#scenarios_listall) + ## TargetTypes - [Get](#targettypes_get) @@ -42,6 +93,101 @@ - [Delete](#targets_delete) - [Get](#targets_get) - [List](#targets_list) + +## Workspaces + +- [CreateOrUpdate](#workspaces_createorupdate) +- [Delete](#workspaces_delete) +- [GetByResourceGroup](#workspaces_getbyresourcegroup) +- [List](#workspaces_list) +- [ListByResourceGroup](#workspaces_listbyresourcegroup) +- [RefreshRecommendations](#workspaces_refreshrecommendations) +- [Update](#workspaces_update) +### ActionVersions_Get + +```java +/** + * Samples for ActionVersions Get. + */ +public final class ActionVersionsGetSamples { + /* + * x-ms-original-file: 2026-05-01-preview/ActionVersions_Get.json + */ + /** + * Sample code: Get an Action Version for westus2 location. + * + * @param manager Entry point to ChaosManager. + */ + public static void getAnActionVersionForWestus2Location(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.actionVersions() + .getWithResponse("westus2", "microsoft-compute-shutdown", "1.0", com.azure.core.util.Context.NONE); + } +} +``` + +### ActionVersions_List + +```java +/** + * Samples for ActionVersions List. + */ +public final class ActionVersionsListSamples { + /* + * x-ms-original-file: 2026-05-01-preview/ActionVersions_List.json + */ + /** + * Sample code: List all Action Versions for a given action. + * + * @param manager Entry point to ChaosManager. + */ + public static void listAllActionVersionsForAGivenAction(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.actionVersions().list("westus2", "microsoft-compute-shutdown", null, com.azure.core.util.Context.NONE); + } +} +``` + +### Actions_Get + +```java +/** + * Samples for Actions Get. + */ +public final class ActionsGetSamples { + /* + * x-ms-original-file: 2026-05-01-preview/Actions_Get.json + */ + /** + * Sample code: Get an Action for westus2 location. + * + * @param manager Entry point to ChaosManager. + */ + public static void getAnActionForWestus2Location(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.actions().getWithResponse("westus2", "microsoft-compute-shutdown", com.azure.core.util.Context.NONE); + } +} +``` + +### Actions_List + +```java +/** + * Samples for Actions List. + */ +public final class ActionsListSamples { + /* + * x-ms-original-file: 2026-05-01-preview/Actions_List.json + */ + /** + * Sample code: List all Actions for westus2 location. + * + * @param manager Entry point to ChaosManager. + */ + public static void listAllActionsForWestus2Location(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.actions().list("westus2", null, com.azure.core.util.Context.NONE); + } +} +``` + ### Capabilities_CreateOrUpdate ```java @@ -52,7 +198,7 @@ import com.azure.resourcemanager.chaos.fluent.models.CapabilityInner; */ public final class CapabilitiesCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-01-01/Capabilities_CreateOrUpdate.json + * x-ms-original-file: 2026-05-01-preview/Capabilities_CreateOrUpdate.json */ /** * Sample code: Create/update a Capability that extends a virtual machine Target resource. @@ -76,7 +222,7 @@ public final class CapabilitiesCreateOrUpdateSamples { */ public final class CapabilitiesDeleteSamples { /* - * x-ms-original-file: 2025-01-01/Capabilities_Delete.json + * x-ms-original-file: 2026-05-01-preview/Capabilities_Delete.json */ /** * Sample code: Delete a Capability that extends a virtual machine Target resource. @@ -100,7 +246,7 @@ public final class CapabilitiesDeleteSamples { */ public final class CapabilitiesGetSamples { /* - * x-ms-original-file: 2025-01-01/Capabilities_Get.json + * x-ms-original-file: 2026-05-01-preview/Capabilities_Get.json */ /** * Sample code: Get a Capability that extends a virtual machine Target resource. @@ -124,7 +270,7 @@ public final class CapabilitiesGetSamples { */ public final class CapabilitiesListSamples { /* - * x-ms-original-file: 2025-01-01/Capabilities_List.json + * x-ms-original-file: 2026-05-01-preview/Capabilities_List.json */ /** * Sample code: List all Capabilities that extend a virtual machine Target resource. @@ -148,7 +294,7 @@ public final class CapabilitiesListSamples { */ public final class CapabilityTypesGetSamples { /* - * x-ms-original-file: 2025-01-01/CapabilityTypes_Get.json + * x-ms-original-file: 2026-05-01-preview/CapabilityTypes_Get.json */ /** * Sample code: Get a Capability Type for a virtual machine Target resource on westus2 location. @@ -171,7 +317,7 @@ public final class CapabilityTypesGetSamples { */ public final class CapabilityTypesListSamples { /* - * x-ms-original-file: 2025-01-01/CapabilityTypes_List.json + * x-ms-original-file: 2026-05-01-preview/CapabilityTypes_List.json */ /** * Sample code: List all Capability Types for a virtual machine Target resource on westus2 location. @@ -185,6 +331,52 @@ public final class CapabilityTypesListSamples { } ``` +### DiscoveredResources_Get + +```java +/** + * Samples for DiscoveredResources Get. + */ +public final class DiscoveredResourcesGetSamples { + /* + * x-ms-original-file: 2026-05-01-preview/DiscoveredResources_Get.json + */ + /** + * Sample code: Get a discovered resource. + * + * @param manager Entry point to ChaosManager. + */ + public static void getADiscoveredResource(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.discoveredResources() + .getWithResponse("exampleRG", "exampleWorkspace", "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + com.azure.core.util.Context.NONE); + } +} +``` + +### DiscoveredResources_ListByWorkspace + +```java +/** + * Samples for DiscoveredResources ListByWorkspace. + */ +public final class DiscoveredResourcesListByWorkspaceSamples { + /* + * x-ms-original-file: 2026-05-01-preview/DiscoveredResources_ListByWorkspace.json + */ + /** + * Sample code: Get a list of discovered resources for a workspace. + * + * @param manager Entry point to ChaosManager. + */ + public static void + getAListOfDiscoveredResourcesForAWorkspace(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.discoveredResources() + .listByWorkspace("exampleRG", "exampleWorkspace", com.azure.core.util.Context.NONE); + } +} +``` + ### Experiments_Cancel ```java @@ -193,7 +385,7 @@ public final class CapabilityTypesListSamples { */ public final class ExperimentsCancelSamples { /* - * x-ms-original-file: 2025-01-01/Experiments_Cancel.json + * x-ms-original-file: 2026-05-01-preview/Experiments_Cancel.json */ /** * Sample code: Cancel a running Experiment. @@ -213,6 +405,7 @@ import com.azure.resourcemanager.chaos.models.ChaosExperimentBranch; import com.azure.resourcemanager.chaos.models.ChaosExperimentStep; import com.azure.resourcemanager.chaos.models.ChaosTargetListSelector; import com.azure.resourcemanager.chaos.models.ContinuousAction; +import com.azure.resourcemanager.chaos.models.CustomerDataStorageProperties; import com.azure.resourcemanager.chaos.models.KeyValuePair; import com.azure.resourcemanager.chaos.models.ManagedServiceIdentityType; import com.azure.resourcemanager.chaos.models.ResourceIdentity; @@ -228,7 +421,7 @@ import java.util.Map; */ public final class ExperimentsCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-01-01/Experiments_CreateOrUpdate.json + * x-ms-original-file: 2026-05-01-preview/Experiments_CreateOrUpdate.json */ /** * Sample code: Create/update a Experiment in a resource group. @@ -255,6 +448,9 @@ public final class ExperimentsCreateOrUpdateSamples { "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/exampleVM/providers/Microsoft.Chaos/targets/Microsoft-VirtualMachine"))))) .withTags(mapOf("key7131", "fakeTokenPlaceholder", "key2138", "fakeTokenPlaceholder")) .withIdentity(new ResourceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED)) + .withCustomerDataStorage(new CustomerDataStorageProperties().withStorageAccountResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/exampleRG/providers/Microsoft.Storage/storageAccounts/exampleStorage") + .withBlobContainerName("azurechaosstudioexperiments")) .create(); } @@ -280,7 +476,7 @@ public final class ExperimentsCreateOrUpdateSamples { */ public final class ExperimentsDeleteSamples { /* - * x-ms-original-file: 2025-01-01/Experiments_Delete.json + * x-ms-original-file: 2026-05-01-preview/Experiments_Delete.json */ /** * Sample code: Delete a Experiment in a resource group. @@ -301,7 +497,7 @@ public final class ExperimentsDeleteSamples { */ public final class ExperimentsExecutionDetailsSamples { /* - * x-ms-original-file: 2025-01-01/Experiments_ExecutionDetails.json + * x-ms-original-file: 2026-05-01-preview/Experiments_ExecutionDetails.json */ /** * Sample code: Get experiment execution details. @@ -324,7 +520,7 @@ public final class ExperimentsExecutionDetailsSamples { */ public final class ExperimentsGetByResourceGroupSamples { /* - * x-ms-original-file: 2025-01-01/Experiments_Get.json + * x-ms-original-file: 2026-05-01-preview/Experiments_Get.json */ /** * Sample code: Get a Experiment in a resource group. @@ -346,7 +542,7 @@ public final class ExperimentsGetByResourceGroupSamples { */ public final class ExperimentsGetExecutionSamples { /* - * x-ms-original-file: 2025-01-01/Experiments_GetExecution.json + * x-ms-original-file: 2026-05-01-preview/Experiments_GetExecution.json */ /** * Sample code: Get the execution of a Experiment. @@ -369,7 +565,7 @@ public final class ExperimentsGetExecutionSamples { */ public final class ExperimentsListSamples { /* - * x-ms-original-file: 2025-01-01/Experiments_ListAll.json + * x-ms-original-file: 2026-05-01-preview/Experiments_ListAll.json */ /** * Sample code: List all Experiments in a subscription. @@ -390,7 +586,7 @@ public final class ExperimentsListSamples { */ public final class ExperimentsListAllExecutionsSamples { /* - * x-ms-original-file: 2025-01-01/Experiments_ListAllExecutions.json + * x-ms-original-file: 2026-05-01-preview/Experiments_ListAllExecutions.json */ /** * Sample code: List all executions of an Experiment. @@ -411,7 +607,7 @@ public final class ExperimentsListAllExecutionsSamples { */ public final class ExperimentsListByResourceGroupSamples { /* - * x-ms-original-file: 2025-01-01/Experiments_List.json + * x-ms-original-file: 2026-05-01-preview/Experiments_List.json */ /** * Sample code: List all Experiments in a resource group. @@ -432,7 +628,7 @@ public final class ExperimentsListByResourceGroupSamples { */ public final class ExperimentsStartSamples { /* - * x-ms-original-file: 2025-01-01/Experiments_Start.json + * x-ms-original-file: 2026-05-01-preview/Experiments_Start.json */ /** * Sample code: Start a Experiment. @@ -460,7 +656,7 @@ import java.util.Map; */ public final class ExperimentsUpdateSamples { /* - * x-ms-original-file: 2025-01-01/Experiments_Update.json + * x-ms-original-file: 2026-05-01-preview/Experiments_Update.json */ /** * Sample code: Update an Experiment in a resource group. @@ -502,7 +698,7 @@ public final class ExperimentsUpdateSamples { */ public final class OperationStatusesGetSamples { /* - * x-ms-original-file: 2025-01-01/OperationStatuses_Get.json + * x-ms-original-file: 2026-05-01-preview/OperationStatuses_Get.json */ /** * Sample code: Gets Chaos Studio async operation status. @@ -516,157 +712,1072 @@ public final class OperationStatusesGetSamples { } ``` -### TargetTypes_Get +### PrivateAccesses_CreateOrUpdate ```java +import com.azure.resourcemanager.chaos.models.PrivateAccessProperties; +import com.azure.resourcemanager.chaos.models.PublicNetworkAccessOption; + /** - * Samples for TargetTypes Get. + * Samples for PrivateAccesses CreateOrUpdate. */ -public final class TargetTypesGetSamples { +public final class PrivateAccessesCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-01-01/TargetTypes_Get.json + * x-ms-original-file: + * 2026-05-01-preview/PrivateAccesses_CreateOrUpdate_Create_Or_Update_A_Private_Access_Resource.json */ /** - * Sample code: Get a Target Type for westus2 location. + * Sample code: Create or Update a private access resource. * * @param manager Entry point to ChaosManager. */ - public static void getATargetTypeForWestus2Location(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.targetTypes().getWithResponse("westus2", "Microsoft-Agent", com.azure.core.util.Context.NONE); + public static void createOrUpdateAPrivateAccessResource(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.privateAccesses() + .define("myPrivateAccess") + .withRegion("centraluseuap") + .withExistingResourceGroup("myResourceGroup") + .withProperties(new PrivateAccessProperties()) + .create(); + } + + /* + * x-ms-original-file: 2026-05-01-preview/ + * PrivateAccesses_CreateOrUpdate_Create_Or_Update_A_Private_Access_Resource_With_Public_Network_Access.json + */ + /** + * Sample code: Create or Update a private access resource with publicNetworkAccess. + * + * @param manager Entry point to ChaosManager. + */ + public static void createOrUpdateAPrivateAccessResourceWithPublicNetworkAccess( + com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.privateAccesses() + .define("myPrivateAccess") + .withRegion("centraluseuap") + .withExistingResourceGroup("myResourceGroup") + .withProperties(new PrivateAccessProperties().withPublicNetworkAccess(PublicNetworkAccessOption.ENABLED)) + .create(); } } ``` -### TargetTypes_List +### PrivateAccesses_Delete ```java /** - * Samples for TargetTypes List. + * Samples for PrivateAccesses Delete. */ -public final class TargetTypesListSamples { +public final class PrivateAccessesDeleteSamples { /* - * x-ms-original-file: 2025-01-01/TargetTypes_List.json + * x-ms-original-file: 2026-05-01-preview/PrivateAccesses_Delete.json */ /** - * Sample code: List all Target Types for westus2 location. + * Sample code: Delete a private access resource. * * @param manager Entry point to ChaosManager. */ - public static void listAllTargetTypesForWestus2Location(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.targetTypes().list("westus2", null, com.azure.core.util.Context.NONE); + public static void deleteAPrivateAccessResource(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.privateAccesses().delete("myResourceGroup", "myPrivateAccess", com.azure.core.util.Context.NONE); } } ``` -### Targets_CreateOrUpdate +### PrivateAccesses_DeleteAPrivateEndpointConnection ```java -import com.azure.resourcemanager.chaos.fluent.models.TargetInner; -import java.util.HashMap; -import java.util.Map; - /** - * Samples for Targets CreateOrUpdate. + * Samples for PrivateAccesses DeleteAPrivateEndpointConnection. */ -public final class TargetsCreateOrUpdateSamples { +public final class PrivateAccessesDeleteAPrivateEndpointConnectionSamples { /* - * x-ms-original-file: 2025-01-01/Targets_CreateOrUpdate.json + * x-ms-original-file: 2026-05-01-preview/PrivateAccesses_DeleteAPrivateEndpointConnection.json */ /** - * Sample code: Create/update a Target that extends a virtual machine resource. + * Sample code: Delete a private endpoint connection under a private access resource. * * @param manager Entry point to ChaosManager. */ - public static void - createUpdateATargetThatExtendsAVirtualMachineResource(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.targets() - .createOrUpdateWithResponse("exampleRG", "Microsoft.Compute", "virtualMachines", "exampleVM", - "Microsoft-VirtualMachine", new TargetInner().withProperties(mapOf()), + public static void deleteAPrivateEndpointConnectionUnderAPrivateAccessResource( + com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.privateAccesses() + .deleteAPrivateEndpointConnection("myResourceGroup", "myPrivateAccess", "myPrivateEndpointConnection", com.azure.core.util.Context.NONE); } +} +``` - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; +### PrivateAccesses_GetAPrivateEndpointConnection + +```java +/** + * Samples for PrivateAccesses GetAPrivateEndpointConnection. + */ +public final class PrivateAccessesGetAPrivateEndpointConnectionSamples { + /* + * x-ms-original-file: 2026-05-01-preview/PrivateAccesses_GetAPrivateEndpointConnection.json + */ + /** + * Sample code: Get information about a private endpoint connection under a private access resource. + * + * @param manager Entry point to ChaosManager. + */ + public static void getInformationAboutAPrivateEndpointConnectionUnderAPrivateAccessResource( + com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.privateAccesses() + .getAPrivateEndpointConnectionWithResponse("myResourceGroup", "myPrivateAccess", + "myPrivateEndpointConnection", com.azure.core.util.Context.NONE); } } ``` -### Targets_Delete +### PrivateAccesses_GetByResourceGroup ```java /** - * Samples for Targets Delete. + * Samples for PrivateAccesses GetByResourceGroup. */ -public final class TargetsDeleteSamples { +public final class PrivateAccessesGetByResourceGroupSamples { /* - * x-ms-original-file: 2025-01-01/Targets_Delete.json + * x-ms-original-file: 2026-05-01-preview/PrivateAccesses_Get_Get_A_Private_Access_Resource.json */ /** - * Sample code: Delete a Target that extends a virtual machine resource. + * Sample code: Get a private access resource. + * + * @param manager Entry point to ChaosManager. + */ + public static void getAPrivateAccessResource(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.privateAccesses() + .getByResourceGroupWithResponse("myResourceGroup", "myPrivateAccess", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * 2026-05-01-preview/PrivateAccesses_Get_Get_A_Private_Access_Resource_With_Private_Endpoint.json + */ + /** + * Sample code: Get a private access resource with private endpoint. * * @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); + getAPrivateAccessResourceWithPrivateEndpoint(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.privateAccesses() + .getByResourceGroupWithResponse("myResourceGroup", "myPrivateAccess", com.azure.core.util.Context.NONE); } } ``` -### Targets_Get +### PrivateAccesses_GetPrivateLinkResources ```java /** - * Samples for Targets Get. + * Samples for PrivateAccesses GetPrivateLinkResources. */ -public final class TargetsGetSamples { +public final class PrivateAccessesGetPrivateLinkResourcesSamples { /* - * x-ms-original-file: 2025-01-01/Targets_Get.json + * x-ms-original-file: 2026-05-01-preview/PrivateAccesses_GetPrivateLinkResources.json */ /** - * Sample code: Get a Target that extends a virtual machine resource. + * Sample code: List all possible private link resources under private access 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", + public static void listAllPossiblePrivateLinkResourcesUnderPrivateAccessResource( + com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.privateAccesses() + .getPrivateLinkResourcesWithResponse("myResourceGroup", "myPrivateAccess", com.azure.core.util.Context.NONE); } } ``` -### Targets_List +### PrivateAccesses_List ```java /** - * Samples for Targets List. + * Samples for PrivateAccesses List. */ -public final class TargetsListSamples { +public final class PrivateAccessesListSamples { /* - * x-ms-original-file: 2025-01-01/Targets_List.json + * x-ms-original-file: 2026-05-01-preview/PrivateAccesses_ListAll.json */ /** - * Sample code: List all Targets that extend a virtual machine resource. + * Sample code: List all private accesses in a subscription. * * @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 listAllPrivateAccessesInASubscription(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.privateAccesses().list(null, com.azure.core.util.Context.NONE); + } +} +``` + +### PrivateAccesses_ListByResourceGroup + +```java +/** + * Samples for PrivateAccesses ListByResourceGroup. + */ +public final class PrivateAccessesListByResourceGroupSamples { + /* + * x-ms-original-file: 2026-05-01-preview/PrivateAccesses_List.json + */ + /** + * Sample code: List all private access in a resource group. + * + * @param manager Entry point to ChaosManager. + */ + public static void listAllPrivateAccessInAResourceGroup(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.privateAccesses().listByResourceGroup("myResourceGroup", null, com.azure.core.util.Context.NONE); + } +} +``` + +### PrivateAccesses_ListPrivateEndpointConnections + +```java +/** + * Samples for PrivateAccesses ListPrivateEndpointConnections. + */ +public final class PrivateAccessesListPrivateEndpointConnectionsSamples { + /* + * x-ms-original-file: 2026-05-01-preview/PrivateAccesses_ListPrivateEndpointConnections.json + */ + /** + * Sample code: List all private endpoint connections under a private access resource. + * + * @param manager Entry point to ChaosManager. + */ + public static void listAllPrivateEndpointConnectionsUnderAPrivateAccessResource( + com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.privateAccesses() + .listPrivateEndpointConnections("myResourceGroup", "myPrivateAccess", com.azure.core.util.Context.NONE); + } +} +``` + +### PrivateAccesses_Update + +```java +import com.azure.resourcemanager.chaos.models.PrivateAccess; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for PrivateAccesses Update. + */ +public final class PrivateAccessesUpdateSamples { + /* + * x-ms-original-file: 2026-05-01-preview/PrivateAccesses_Update.json + */ + /** + * Sample code: Update a private access resource's tags. + * + * @param manager Entry point to ChaosManager. + */ + public static void updateAPrivateAccessResourceSTags(com.azure.resourcemanager.chaos.ChaosManager manager) { + PrivateAccess resource = manager.privateAccesses() + .getByResourceGroupWithResponse("myResourceGroup", "myPrivateAccess", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### ScenarioConfigurations_CreateOrUpdate + +```java +import com.azure.resourcemanager.chaos.models.ConfigurationExclusions; +import com.azure.resourcemanager.chaos.models.ConfigurationFilters; +import com.azure.resourcemanager.chaos.models.KeyValuePair; +import com.azure.resourcemanager.chaos.models.ScenarioConfigurationProperties; +import java.util.Arrays; + +/** + * Samples for ScenarioConfigurations CreateOrUpdate. + */ +public final class ScenarioConfigurationsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-05-01-preview/ScenarioConfigurations_CreateOrUpdate_With_Physical_Zones.json + */ + /** + * Sample code: Create or update a scenario configuration with physical zone targeting. + * + * @param manager Entry point to ChaosManager. + */ + public static void createOrUpdateAScenarioConfigurationWithPhysicalZoneTargeting( + com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.scenarioConfigurations() + .define("config-physical-zone") + .withExistingScenario("exampleRG", "exampleWorkspace", "12345678-1234-1234-1234-123456789012") + .withProperties(new ScenarioConfigurationProperties().withScenarioId( + "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Chaos/workspaces/exampleWorkspace/scenarios/12345678-1234-1234-1234-123456789012") + .withParameters(Arrays.asList(new KeyValuePair().withKey("fakeTokenPlaceholder").withValue("PT10M"))) + .withExclusions(new ConfigurationExclusions().withResources(Arrays.asList( + "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/protectedVM"))) + .withFilters(new ConfigurationFilters().withLocations(Arrays.asList("westus2")) + .withPhysicalZones(Arrays.asList("westus2-az1")))) + .create(); + } + + /* + * x-ms-original-file: 2026-05-01-preview/ScenarioConfigurations_CreateOrUpdate.json + */ + /** + * Sample code: Create or update a scenario configuration. + * + * @param manager Entry point to ChaosManager. + */ + public static void createOrUpdateAScenarioConfiguration(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.scenarioConfigurations() + .define("config-5678-9012-3456-789012345678") + .withExistingScenario("exampleRG", "exampleWorkspace", "12345678-1234-1234-1234-123456789012") + .withProperties(new ScenarioConfigurationProperties().withScenarioId( + "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Chaos/workspaces/exampleWorkspace/scenarios/12345678-1234-1234-1234-123456789012") + .withParameters(Arrays.asList(new KeyValuePair().withKey("fakeTokenPlaceholder").withValue("PT10M"), + new KeyValuePair().withKey("fakeTokenPlaceholder") + .withValue( + "[\"/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/vm1\",\"/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/vm2\"]"))) + .withExclusions(new ConfigurationExclusions().withResources(Arrays.asList( + "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/protectedVM")) + .withTags(Arrays.asList(new KeyValuePair().withKey("fakeTokenPlaceholder").withValue("production"))) + .withTypes(Arrays.asList("Microsoft.Compute/virtualMachineScaleSets"))) + .withFilters( + new ConfigurationFilters().withLocations(Arrays.asList("eastus")).withZones(Arrays.asList("1")))) + .create(); + } +} +``` + +### ScenarioConfigurations_Delete + +```java +/** + * Samples for ScenarioConfigurations Delete. + */ +public final class ScenarioConfigurationsDeleteSamples { + /* + * x-ms-original-file: 2026-05-01-preview/ScenarioConfigurations_Delete.json + */ + /** + * Sample code: Delete a scenario configuration. + * + * @param manager Entry point to ChaosManager. + */ + public static void deleteAScenarioConfiguration(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.scenarioConfigurations() + .delete("exampleRG", "exampleWorkspace", "12345678-1234-1234-1234-123456789012", + "config-5678-9012-3456-789012345678", com.azure.core.util.Context.NONE); + } +} +``` + +### ScenarioConfigurations_Execute + +```java +/** + * Samples for ScenarioConfigurations Execute. + */ +public final class ScenarioConfigurationsExecuteSamples { + /* + * x-ms-original-file: 2026-05-01-preview/ScenarioConfigurations_Execute.json + */ + /** + * Sample code: Execute the scenario execution with the given scenario configuration. + * + * @param manager Entry point to ChaosManager. + */ + public static void executeTheScenarioExecutionWithTheGivenScenarioConfiguration( + com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.scenarioConfigurations() + .executeWithResponse("exampleRG", "exampleWorkspace", "12345678-1234-1234-1234-123456789012", + "config-5678-9012-3456-789012345678", com.azure.core.util.Context.NONE); + } +} +``` + +### ScenarioConfigurations_FixResourcePermissions + +```java + +/** + * Samples for ScenarioConfigurations FixResourcePermissions. + */ +public final class ScenarioConfigurationsFixResourcePermissionsSamples { + /* + * x-ms-original-file: 2026-05-01-preview/ScenarioConfigurations_FixResourcePermissions.json + */ + /** + * Sample code: Fixes resource permissions for the given scenario configuration. + * + * @param manager Entry point to ChaosManager. + */ + public static void + fixesResourcePermissionsForTheGivenScenarioConfiguration(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.scenarioConfigurations() + .fixResourcePermissions("exampleRG", "exampleWorkspace", "12345678-1234-1234-1234-123456789012", + "config-5678-9012-3456-789012345678", null, com.azure.core.util.Context.NONE); + } +} +``` + +### ScenarioConfigurations_Get + +```java +/** + * Samples for ScenarioConfigurations Get. + */ +public final class ScenarioConfigurationsGetSamples { + /* + * x-ms-original-file: 2026-05-01-preview/ScenarioConfigurations_Get.json + */ + /** + * Sample code: Get a scenario configuration. + * + * @param manager Entry point to ChaosManager. + */ + public static void getAScenarioConfiguration(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.scenarioConfigurations() + .getWithResponse("exampleRG", "exampleWorkspace", "12345678-1234-1234-1234-123456789012", + "config-5678-9012-3456-789012345678", com.azure.core.util.Context.NONE); + } +} +``` + +### ScenarioConfigurations_ListAll + +```java +/** + * Samples for ScenarioConfigurations ListAll. + */ +public final class ScenarioConfigurationsListAllSamples { + /* + * x-ms-original-file: 2026-05-01-preview/ScenarioConfigurations_ListAll.json + */ + /** + * Sample code: Get a list of scenario configurations. + * + * @param manager Entry point to ChaosManager. + */ + public static void getAListOfScenarioConfigurations(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.scenarioConfigurations() + .listAll("exampleRG", "exampleWorkspace", "12345678-1234-1234-1234-123456789012", + com.azure.core.util.Context.NONE); + } +} +``` + +### ScenarioConfigurations_Validate + +```java +/** + * Samples for ScenarioConfigurations Validate. + */ +public final class ScenarioConfigurationsValidateSamples { + /* + * x-ms-original-file: 2026-05-01-preview/ScenarioConfigurations_Validate.json + */ + /** + * Sample code: Validate the given scenario configuration. + * + * @param manager Entry point to ChaosManager. + */ + public static void validateTheGivenScenarioConfiguration(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.scenarioConfigurations() + .validate("exampleRG", "exampleWorkspace", "12345678-1234-1234-1234-123456789012", + "config-5678-9012-3456-789012345678", com.azure.core.util.Context.NONE); + } +} +``` + +### ScenarioRuns_Cancel + +```java +/** + * Samples for ScenarioRuns Cancel. + */ +public final class ScenarioRunsCancelSamples { + /* + * x-ms-original-file: 2026-05-01-preview/ScenarioRuns_Cancel.json + */ + /** + * Sample code: Cancel a running scenario run. + * + * @param manager Entry point to ChaosManager. + */ + public static void cancelARunningScenarioRun(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.scenarioRuns() + .cancelWithResponse("exampleRG", "exampleWorkspace", "12345678-1234-1234-1234-123456789012", + "abcd1234-5678-9012-3456-789012345678", com.azure.core.util.Context.NONE); + } +} +``` + +### ScenarioRuns_Get + +```java +/** + * Samples for ScenarioRuns Get. + */ +public final class ScenarioRunsGetSamples { + /* + * x-ms-original-file: 2026-05-01-preview/ScenarioRuns_Get.json + */ + /** + * Sample code: Get a scenario run. + * + * @param manager Entry point to ChaosManager. + */ + public static void getAScenarioRun(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.scenarioRuns() + .getWithResponse("exampleRG", "exampleWorkspace", "12345678-1234-1234-1234-123456789012", + "abcd1234-5678-9012-3456-789012345678", com.azure.core.util.Context.NONE); + } +} +``` + +### ScenarioRuns_ListAll + +```java +/** + * Samples for ScenarioRuns ListAll. + */ +public final class ScenarioRunsListAllSamples { + /* + * x-ms-original-file: 2026-05-01-preview/ScenarioRuns_ListAll.json + */ + /** + * Sample code: Get a list of scenario runs. + * + * @param manager Entry point to ChaosManager. + */ + public static void getAListOfScenarioRuns(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.scenarioRuns() + .listAll("exampleRG", "exampleWorkspace", "12345678-1234-1234-1234-123456789012", + com.azure.core.util.Context.NONE); + } +} +``` + +### Scenarios_CreateOrUpdate + +```java +import com.azure.resourcemanager.chaos.models.ExternalResource; +import com.azure.resourcemanager.chaos.models.KeyValuePair; +import com.azure.resourcemanager.chaos.models.ParameterType; +import com.azure.resourcemanager.chaos.models.ScenarioAction; +import com.azure.resourcemanager.chaos.models.ScenarioParameter; +import com.azure.resourcemanager.chaos.models.ScenarioProperties; +import java.util.Arrays; + +/** + * Samples for Scenarios CreateOrUpdate. + */ +public final class ScenariosCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-05-01-preview/Scenarios_CreateOrUpdate.json + */ + /** + * Sample code: Create or update a scenario. + * + * @param manager Entry point to ChaosManager. + */ + public static void createOrUpdateAScenario(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.scenarios() + .define("zoneDownScenario") + .withExistingWorkspace("exampleRG", "exampleWorkspace") + .withProperties(new ScenarioProperties().withDescription( + "Induces an outage of all discovered VM and VMSS instances in the target zone with an option to invoke custom scripted actions using Automation Runbooks. Additionally, it forces failover of discovered Redis instances to simulate backend zonal outage.") + .withParameters(Arrays.asList( + new ScenarioParameter().withName("duration") + .withType(ParameterType.STRING) + .withDefaultProperty("PT15M") + .withRequired(false) + .withDescription("The duration of the outage scenario."), + new ScenarioParameter().withName("customRunbook1ResourceId") + .withType(ParameterType.STRING) + .withRequired(false) + .withDescription( + "Optional custom runbook 1 resource ID. If not provided, this action will be skipped."), + new ScenarioParameter().withName("customRunbook1ParametersJson") + .withType(ParameterType.STRING) + .withDefaultProperty("{}") + .withRequired(false) + .withDescription("Optional custom runbook 1 parameters in JSON format."))) + .withActions( + Arrays + .asList( + new ScenarioAction().withName("vmssZoneDown") + .withActionId("urn:csci:microsoft:compute:shutdown/1.0.0") + .withDescription("Force shutdown VMSS instances in target zone") + .withDuration("%%{parameters.duration}%%") + .withParameters(Arrays.asList(new KeyValuePair().withKey("fakeTokenPlaceholder") + .withValue("%%{filters.zones}%%"))), + new ScenarioAction().withName("vmZoneDown") + .withActionId("urn:csci:microsoft:compute:shutdown/1.0.0") + .withDescription("Force shutdown VM instances in target zone") + .withDuration("%%{parameters.duration}%%") + .withParameters(Arrays.asList(new KeyValuePair().withKey("fakeTokenPlaceholder") + .withValue("%%{filters.zones}%%"))), + new ScenarioAction() + .withName("redisFailover") + .withActionId("urn:csci:microsoft:azureClusteredCacheForRedis:Reboot/1.0.0") + .withDescription("Force failover of Redis instances to simulate backend zonal outage") + .withDuration("PT5M") + .withParameters( + Arrays.asList( + new KeyValuePair().withKey("fakeTokenPlaceholder").withValue("PrimaryNode"))), + new ScenarioAction().withName("custom-runbook-1") + .withActionId("urn:csci:microsoft:Automation:StartRunbook/1.0.0") + .withDescription("Custom Runbook 1") + .withDuration("PT30M") + .withParameters(Arrays.asList(new KeyValuePair() + .withKey("fakeTokenPlaceholder") + .withValue("%%{parameters.customRunbook1ParametersJson}%%"))) + .withExternalResource(new ExternalResource().withResourceId( + "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Automation/automationAccounts/exampleAutomationAccount/runbooks/exampleRunbook"))))) + .create(); + } +} +``` + +### Scenarios_Delete + +```java +/** + * Samples for Scenarios Delete. + */ +public final class ScenariosDeleteSamples { + /* + * x-ms-original-file: 2026-05-01-preview/Scenarios_Delete.json + */ + /** + * Sample code: Delete a Scenario in a workspace. + * + * @param manager Entry point to ChaosManager. + */ + public static void deleteAScenarioInAWorkspace(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.scenarios() + .deleteWithResponse("exampleRG", "exampleWorkspace", "myVMShutdownScenario", + com.azure.core.util.Context.NONE); + } +} +``` + +### Scenarios_Get + +```java +/** + * Samples for Scenarios Get. + */ +public final class ScenariosGetSamples { + /* + * x-ms-original-file: 2026-05-01-preview/Scenarios_Get.json + */ + /** + * Sample code: Get a scenario. + * + * @param manager Entry point to ChaosManager. + */ + public static void getAScenario(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.scenarios() + .getWithResponse("exampleRG", "exampleWorkspace", "zoneDownScenario", com.azure.core.util.Context.NONE); + } +} +``` + +### Scenarios_ListAll + +```java +/** + * Samples for Scenarios ListAll. + */ +public final class ScenariosListAllSamples { + /* + * x-ms-original-file: 2026-05-01-preview/Scenarios_ListAll.json + */ + /** + * Sample code: Get a list of scenarios. + * + * @param manager Entry point to ChaosManager. + */ + public static void getAListOfScenarios(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.scenarios().listAll("exampleRG", "exampleWorkspace", com.azure.core.util.Context.NONE); + } +} +``` + +### TargetTypes_Get + +```java +/** + * Samples for TargetTypes Get. + */ +public final class TargetTypesGetSamples { + /* + * x-ms-original-file: 2026-05-01-preview/TargetTypes_Get.json + */ + /** + * Sample code: Get a Target Type for westus2 location. + * + * @param manager Entry point to ChaosManager. + */ + public static void getATargetTypeForWestus2Location(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.targetTypes().getWithResponse("westus2", "Microsoft-Agent", com.azure.core.util.Context.NONE); + } +} +``` + +### TargetTypes_List + +```java +/** + * Samples for TargetTypes List. + */ +public final class TargetTypesListSamples { + /* + * x-ms-original-file: 2026-05-01-preview/TargetTypes_List.json + */ + /** + * Sample code: List all Target Types for westus2 location. + * + * @param manager Entry point to ChaosManager. + */ + public static void listAllTargetTypesForWestus2Location(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.targetTypes().list("westus2", null, com.azure.core.util.Context.NONE); + } +} +``` + +### Targets_CreateOrUpdate + +```java +import com.azure.resourcemanager.chaos.fluent.models.TargetInner; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Targets CreateOrUpdate. + */ +public final class TargetsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-05-01-preview/Targets_CreateOrUpdate.json + */ + /** + * Sample code: Create/update a Target that extends a virtual machine resource. + * + * @param manager Entry point to ChaosManager. + */ + public static void + createUpdateATargetThatExtendsAVirtualMachineResource(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.targets() + .createOrUpdateWithResponse("exampleRG", "Microsoft.Compute", "virtualMachines", "exampleVM", + "Microsoft-VirtualMachine", new TargetInner().withProperties(mapOf()), + com.azure.core.util.Context.NONE); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### Targets_Delete + +```java +/** + * Samples for Targets Delete. + */ +public final class TargetsDeleteSamples { + /* + * x-ms-original-file: 2026-05-01-preview/Targets_Delete.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); + } +} +``` + +### Targets_Get + +```java +/** + * Samples for Targets Get. + */ +public final class TargetsGetSamples { + /* + * x-ms-original-file: 2026-05-01-preview/Targets_Get.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); + } +} +``` + +### Targets_List + +```java +/** + * Samples for Targets List. + */ +public final class TargetsListSamples { + /* + * x-ms-original-file: 2026-05-01-preview/Targets_List.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); + } +} +``` + +### Workspaces_CreateOrUpdate + +```java +import com.azure.resourcemanager.chaos.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.chaos.models.ResourceIdentity; +import com.azure.resourcemanager.chaos.models.UserAssignedIdentity; +import com.azure.resourcemanager.chaos.models.WorkspaceProperties; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Workspaces CreateOrUpdate. + */ +public final class WorkspacesCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-05-01-preview/Workspaces_CreateOrUpdate.json + */ + /** + * Sample code: Create/update a workspace in a resource group. + * + * @param manager Entry point to ChaosManager. + */ + public static void createUpdateAWorkspaceInAResourceGroup(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.workspaces() + .define("exampleWorkspace") + .withRegion("westus2") + .withExistingResourceGroup("exampleRG") + .withProperties(new WorkspaceProperties().withScopes(Arrays + .asList("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/exampleResourceGroup"))) + .withTags(mapOf("environment", "production", "department", "engineering", "project", "chaos-testing")) + .withIdentity(new ResourceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/exampleResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleIdentity", + new UserAssignedIdentity()))) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### Workspaces_Delete + +```java +/** + * Samples for Workspaces Delete. + */ +public final class WorkspacesDeleteSamples { + /* + * x-ms-original-file: 2026-05-01-preview/Workspaces_Delete.json + */ + /** + * Sample code: Delete a Workspace in a resource group. + * + * @param manager Entry point to ChaosManager. + */ + public static void deleteAWorkspaceInAResourceGroup(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.workspaces().delete("exampleRG", "exampleWorkspace", com.azure.core.util.Context.NONE); + } +} +``` + +### Workspaces_GetByResourceGroup + +```java +/** + * Samples for Workspaces GetByResourceGroup. + */ +public final class WorkspacesGetByResourceGroupSamples { + /* + * x-ms-original-file: 2026-05-01-preview/Workspaces_Get.json + */ + /** + * Sample code: Get a Workspace in a resource group. + * + * @param manager Entry point to ChaosManager. + */ + public static void getAWorkspaceInAResourceGroup(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.workspaces() + .getByResourceGroupWithResponse("exampleRG", "exampleWorkspace", com.azure.core.util.Context.NONE); + } +} +``` + +### Workspaces_List + +```java +/** + * Samples for Workspaces List. + */ +public final class WorkspacesListSamples { + /* + * x-ms-original-file: 2026-05-01-preview/Workspaces_ListAll.json + */ + /** + * Sample code: List all Workspaces in a subscription. + * + * @param manager Entry point to ChaosManager. + */ + public static void listAllWorkspacesInASubscription(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.workspaces().list(null, com.azure.core.util.Context.NONE); + } +} +``` + +### Workspaces_ListByResourceGroup + +```java +/** + * Samples for Workspaces ListByResourceGroup. + */ +public final class WorkspacesListByResourceGroupSamples { + /* + * x-ms-original-file: 2026-05-01-preview/Workspaces_List.json + */ + /** + * Sample code: List all Workspaces in a resource group. + * + * @param manager Entry point to ChaosManager. + */ + public static void listAllWorkspacesInAResourceGroup(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.workspaces().listByResourceGroup("exampleRG", null, com.azure.core.util.Context.NONE); + } +} +``` + +### Workspaces_RefreshRecommendations + +```java +/** + * Samples for Workspaces RefreshRecommendations. + */ +public final class WorkspacesRefreshRecommendationsSamples { + /* + * x-ms-original-file: 2026-05-01-preview/Workspaces_RefreshRecommendations.json + */ + /** + * Sample code: Refresh recommendations for all scenarios in a workspace. + * + * @param manager Entry point to ChaosManager. + */ + public static void + refreshRecommendationsForAllScenariosInAWorkspace(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.workspaces().refreshRecommendations("exampleRG", "exampleWorkspace", com.azure.core.util.Context.NONE); + } +} +``` + +### Workspaces_Update + +```java +import com.azure.resourcemanager.chaos.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.chaos.models.ResourceIdentity; +import com.azure.resourcemanager.chaos.models.UserAssignedIdentity; +import com.azure.resourcemanager.chaos.models.Workspace; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Workspaces Update. + */ +public final class WorkspacesUpdateSamples { + /* + * x-ms-original-file: 2026-05-01-preview/Workspaces_Update.json + */ + /** + * Sample code: Update a Workspace in a resource group. + * + * @param manager Entry point to ChaosManager. + */ + public static void updateAWorkspaceInAResourceGroup(com.azure.resourcemanager.chaos.ChaosManager manager) { + Workspace resource = manager.workspaces() + .getByResourceGroupWithResponse("exampleRG", "exampleWorkspace", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withTags(mapOf("environment", "production", "department", "engineering", "project", "chaos-testing")) + .withIdentity(new ResourceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/exampleResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleIdentity", + new UserAssignedIdentity()))) + .apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; } } ``` diff --git a/sdk/chaos/azure-resourcemanager-chaos/pom.xml b/sdk/chaos/azure-resourcemanager-chaos/pom.xml index cf31a7d27cf0..e338c729d171 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/pom.xml +++ b/sdk/chaos/azure-resourcemanager-chaos/pom.xml @@ -3,7 +3,7 @@ ~ Licensed under the MIT License. ~ Code generated by Microsoft (R) TypeSpec Code Generator. --> - + 4.0.0 com.azure @@ -18,7 +18,7 @@ jar Microsoft Azure SDK for Chaos Management - This package contains Microsoft Azure SDK for Chaos Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Chaos Management Client. + 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 api-version 2026-05-01-preview. https://github.com/Azure/azure-sdk-for-java 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 2db6c4127d15..c29fc749f35e 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 @@ -25,21 +25,37 @@ import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.chaos.fluent.ChaosManagementClient; +import com.azure.resourcemanager.chaos.implementation.ActionVersionsImpl; +import com.azure.resourcemanager.chaos.implementation.ActionsImpl; import com.azure.resourcemanager.chaos.implementation.CapabilitiesImpl; import com.azure.resourcemanager.chaos.implementation.CapabilityTypesImpl; import com.azure.resourcemanager.chaos.implementation.ChaosManagementClientBuilder; +import com.azure.resourcemanager.chaos.implementation.DiscoveredResourcesImpl; import com.azure.resourcemanager.chaos.implementation.ExperimentsImpl; import com.azure.resourcemanager.chaos.implementation.OperationStatusesImpl; import com.azure.resourcemanager.chaos.implementation.OperationsImpl; +import com.azure.resourcemanager.chaos.implementation.PrivateAccessesImpl; +import com.azure.resourcemanager.chaos.implementation.ScenarioConfigurationsImpl; +import com.azure.resourcemanager.chaos.implementation.ScenarioRunsImpl; +import com.azure.resourcemanager.chaos.implementation.ScenariosImpl; import com.azure.resourcemanager.chaos.implementation.TargetTypesImpl; import com.azure.resourcemanager.chaos.implementation.TargetsImpl; +import com.azure.resourcemanager.chaos.implementation.WorkspacesImpl; +import com.azure.resourcemanager.chaos.models.ActionVersions; +import com.azure.resourcemanager.chaos.models.Actions; import com.azure.resourcemanager.chaos.models.Capabilities; import com.azure.resourcemanager.chaos.models.CapabilityTypes; +import com.azure.resourcemanager.chaos.models.DiscoveredResources; import com.azure.resourcemanager.chaos.models.Experiments; import com.azure.resourcemanager.chaos.models.OperationStatuses; import com.azure.resourcemanager.chaos.models.Operations; +import com.azure.resourcemanager.chaos.models.PrivateAccesses; +import com.azure.resourcemanager.chaos.models.ScenarioConfigurations; +import com.azure.resourcemanager.chaos.models.ScenarioRuns; +import com.azure.resourcemanager.chaos.models.Scenarios; import com.azure.resourcemanager.chaos.models.TargetTypes; import com.azure.resourcemanager.chaos.models.Targets; +import com.azure.resourcemanager.chaos.models.Workspaces; import java.time.Duration; import java.time.temporal.ChronoUnit; import java.util.ArrayList; @@ -63,10 +79,26 @@ public final class ChaosManager { private Experiments experiments; + private PrivateAccesses privateAccesses; + + private Actions actions; + + private ActionVersions actionVersions; + private TargetTypes targetTypes; private OperationStatuses operationStatuses; + private Workspaces workspaces; + + private DiscoveredResources discoveredResources; + + private Scenarios scenarios; + + private ScenarioRuns scenarioRuns; + + private ScenarioConfigurations scenarioConfigurations; + private final ChaosManagementClient clientObject; private ChaosManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { @@ -342,6 +374,42 @@ public Experiments experiments() { return experiments; } + /** + * Gets the resource collection API of PrivateAccesses. It manages PrivateAccess. + * + * @return Resource collection API of PrivateAccesses. + */ + public PrivateAccesses privateAccesses() { + if (this.privateAccesses == null) { + this.privateAccesses = new PrivateAccessesImpl(clientObject.getPrivateAccesses(), this); + } + return privateAccesses; + } + + /** + * Gets the resource collection API of Actions. + * + * @return Resource collection API of Actions. + */ + public Actions actions() { + if (this.actions == null) { + this.actions = new ActionsImpl(clientObject.getActions(), this); + } + return actions; + } + + /** + * Gets the resource collection API of ActionVersions. + * + * @return Resource collection API of ActionVersions. + */ + public ActionVersions actionVersions() { + if (this.actionVersions == null) { + this.actionVersions = new ActionVersionsImpl(clientObject.getActionVersions(), this); + } + return actionVersions; + } + /** * Gets the resource collection API of TargetTypes. * @@ -366,6 +434,67 @@ public OperationStatuses operationStatuses() { return operationStatuses; } + /** + * Gets the resource collection API of Workspaces. It manages Workspace. + * + * @return Resource collection API of Workspaces. + */ + public Workspaces workspaces() { + if (this.workspaces == null) { + this.workspaces = new WorkspacesImpl(clientObject.getWorkspaces(), this); + } + return workspaces; + } + + /** + * Gets the resource collection API of DiscoveredResources. + * + * @return Resource collection API of DiscoveredResources. + */ + public DiscoveredResources discoveredResources() { + if (this.discoveredResources == null) { + this.discoveredResources = new DiscoveredResourcesImpl(clientObject.getDiscoveredResources(), this); + } + return discoveredResources; + } + + /** + * Gets the resource collection API of Scenarios. It manages Scenario. + * + * @return Resource collection API of Scenarios. + */ + public Scenarios scenarios() { + if (this.scenarios == null) { + this.scenarios = new ScenariosImpl(clientObject.getScenarios(), this); + } + return scenarios; + } + + /** + * Gets the resource collection API of ScenarioRuns. + * + * @return Resource collection API of ScenarioRuns. + */ + public ScenarioRuns scenarioRuns() { + if (this.scenarioRuns == null) { + this.scenarioRuns = new ScenarioRunsImpl(clientObject.getScenarioRuns(), this); + } + return scenarioRuns; + } + + /** + * Gets the resource collection API of ScenarioConfigurations. It manages ScenarioConfiguration. + * + * @return Resource collection API of ScenarioConfigurations. + */ + public ScenarioConfigurations scenarioConfigurations() { + if (this.scenarioConfigurations == null) { + this.scenarioConfigurations + = new ScenarioConfigurationsImpl(clientObject.getScenarioConfigurations(), this); + } + return scenarioConfigurations; + } + /** * Gets wrapped service client ChaosManagementClient providing direct access to the underlying auto-generated API * implementation, based on Azure REST API. diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ActionVersionsClient.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ActionVersionsClient.java new file mode 100644 index 000000000000..515d31dffbce --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ActionVersionsClient.java @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.chaos.fluent.models.ActionVersionInner; + +/** + * An instance of this class provides access to all the operations defined in ActionVersionsClient. + */ +public interface ActionVersionsClient { + /** + * Get an Action Version resource for a given location and action. + * + * @param location The name of the Azure region. + * @param actionName String that represents an Action resource name. + * @param versionName String that represents an Action Version resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Action Version resource for a given location and action along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String location, String actionName, String versionName, + Context context); + + /** + * Get an Action Version resource for a given location and action. + * + * @param location The name of the Azure region. + * @param actionName String that represents an Action resource name. + * @param versionName String that represents an Action Version 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 an Action Version resource for a given location and action. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ActionVersionInner get(String location, String actionName, String versionName); + + /** + * Get a list of Action Version resources for a given location and action. + * + * @param location The name of the Azure region. + * @param actionName String that represents an Action 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 Action Version resources for a given location and action as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String location, String actionName); + + /** + * Get a list of Action Version resources for a given location and action. + * + * @param location The name of the Azure region. + * @param actionName String that represents an Action resource name. + * @param continuationToken String that sets the continuation token. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Action Version resources for a given location and action as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String location, String actionName, String continuationToken, + Context context); +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ActionsClient.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ActionsClient.java new file mode 100644 index 000000000000..04fc34efac85 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ActionsClient.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.chaos.fluent.models.ActionInner; + +/** + * An instance of this class provides access to all the operations defined in ActionsClient. + */ +public interface ActionsClient { + /** + * Get an Action resource for a given location. + * + * @param location The name of the Azure region. + * @param actionName String that represents an Action resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Action resource for a given location along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String location, String actionName, Context context); + + /** + * Get an Action resource for a given location. + * + * @param location The name of the Azure region. + * @param actionName String that represents an Action 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 an Action resource for a given location. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ActionInner get(String location, String actionName); + + /** + * Get a list of Action resources for a given location. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Action resources for a given location as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String location); + + /** + * Get a list of Action resources for a given location. + * + * @param location The name of the Azure region. + * @param continuationToken String that sets the continuation token. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 Action resources for a given location as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String location, String continuationToken, Context context); +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ChaosManagementClient.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ChaosManagementClient.java index 0d648e81ac64..6af3fef12ac8 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 @@ -81,6 +81,27 @@ public interface ChaosManagementClient { */ ExperimentsClient getExperiments(); + /** + * Gets the PrivateAccessesClient object to access its operations. + * + * @return the PrivateAccessesClient object. + */ + PrivateAccessesClient getPrivateAccesses(); + + /** + * Gets the ActionsClient object to access its operations. + * + * @return the ActionsClient object. + */ + ActionsClient getActions(); + + /** + * Gets the ActionVersionsClient object to access its operations. + * + * @return the ActionVersionsClient object. + */ + ActionVersionsClient getActionVersions(); + /** * Gets the TargetTypesClient object to access its operations. * @@ -94,4 +115,39 @@ public interface ChaosManagementClient { * @return the OperationStatusesClient object. */ OperationStatusesClient getOperationStatuses(); + + /** + * Gets the WorkspacesClient object to access its operations. + * + * @return the WorkspacesClient object. + */ + WorkspacesClient getWorkspaces(); + + /** + * Gets the DiscoveredResourcesClient object to access its operations. + * + * @return the DiscoveredResourcesClient object. + */ + DiscoveredResourcesClient getDiscoveredResources(); + + /** + * Gets the ScenariosClient object to access its operations. + * + * @return the ScenariosClient object. + */ + ScenariosClient getScenarios(); + + /** + * Gets the ScenarioRunsClient object to access its operations. + * + * @return the ScenarioRunsClient object. + */ + ScenarioRunsClient getScenarioRuns(); + + /** + * Gets the ScenarioConfigurationsClient object to access its operations. + * + * @return the ScenarioConfigurationsClient object. + */ + ScenarioConfigurationsClient getScenarioConfigurations(); } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/DiscoveredResourcesClient.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/DiscoveredResourcesClient.java new file mode 100644 index 000000000000..583736661fb2 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/DiscoveredResourcesClient.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.chaos.fluent.models.DiscoveredResourceInner; + +/** + * An instance of this class provides access to all the operations defined in DiscoveredResourcesClient. + */ +public interface DiscoveredResourcesClient { + /** + * Get a discovered resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param discoveredResourceName Name of the discovered 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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a discovered resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String workspaceName, + String discoveredResourceName, Context context); + + /** + * Get a discovered resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param discoveredResourceName Name of the discovered resource. + * @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 discovered resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DiscoveredResourceInner get(String resourceGroupName, String workspaceName, String discoveredResourceName); + + /** + * Get a list of discovered resources for a workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace 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 discovered resources for a workspace as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByWorkspace(String resourceGroupName, String workspaceName); + + /** + * Get a list of discovered resources for a workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of discovered resources for a workspace as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByWorkspace(String resourceGroupName, String workspaceName, + Context context); +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/PrivateAccessesClient.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/PrivateAccessesClient.java new file mode 100644 index 000000000000..c47bbbbf0dec --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/PrivateAccessesClient.java @@ -0,0 +1,447 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.chaos.fluent.models.PrivateAccessInner; +import com.azure.resourcemanager.chaos.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.chaos.fluent.models.PrivateLinkResourceListResultInner; +import com.azure.resourcemanager.chaos.models.PrivateAccessPatch; + +/** + * An instance of this class provides access to all the operations defined in PrivateAccessesClient. + */ +public interface PrivateAccessesClient { + /** + * Get a private access resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private access resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String privateAccessName, + Context context); + + /** + * Get a private access resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @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 private access resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateAccessInner getByResourceGroup(String resourceGroupName, String privateAccessName); + + /** + * Create or update a private access. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param resource private access resource to be created or updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of privateAccesses tracked resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PrivateAccessInner> beginCreateOrUpdate(String resourceGroupName, + String privateAccessName, PrivateAccessInner resource); + + /** + * Create or update a private access. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param resource private access resource to be created or updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of privateAccesses tracked resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PrivateAccessInner> beginCreateOrUpdate(String resourceGroupName, + String privateAccessName, PrivateAccessInner resource, Context context); + + /** + * Create or update a private access. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param resource private access resource to be created or updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return privateAccesses tracked resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateAccessInner createOrUpdate(String resourceGroupName, String privateAccessName, PrivateAccessInner resource); + + /** + * Create or update a private access. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param resource private access resource to be created or updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return privateAccesses tracked resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateAccessInner createOrUpdate(String resourceGroupName, String privateAccessName, PrivateAccessInner resource, + Context context); + + /** + * Patch a private access tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param properties private access resource's tags to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of privateAccesses tracked resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PrivateAccessInner> beginUpdate(String resourceGroupName, + String privateAccessName, PrivateAccessPatch properties); + + /** + * Patch a private access tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param properties private access resource's tags to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of privateAccesses tracked resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PrivateAccessInner> beginUpdate(String resourceGroupName, + String privateAccessName, PrivateAccessPatch properties, Context context); + + /** + * Patch a private access tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param properties private access resource's tags to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return privateAccesses tracked resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateAccessInner update(String resourceGroupName, String privateAccessName, PrivateAccessPatch properties); + + /** + * Patch a private access tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param properties private access resource's tags to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return privateAccesses tracked resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateAccessInner update(String resourceGroupName, String privateAccessName, PrivateAccessPatch properties, + Context context); + + /** + * Delete a private access. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String privateAccessName); + + /** + * Delete a private access. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String privateAccessName, Context context); + + /** + * Delete a private access. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String privateAccessName); + + /** + * Delete a private access. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String privateAccessName, Context context); + + /** + * Get a list of private access resources in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private access resources in a resource group as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Get a list of private access resources in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param continuationToken String that sets the continuation token. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private access resources in a resource group as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, String continuationToken, + Context context); + + /** + * Get a list of private access 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 private access resources in a subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Get a list of private access resources in a subscription. + * + * @param continuationToken String that sets the continuation token. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private access resources in a subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String continuationToken, Context context); + + /** + * Gets the private link resources possible under private access resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the private link resources possible under private access resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getPrivateLinkResourcesWithResponse(String resourceGroupName, + String privateAccessName, Context context); + + /** + * Gets the private link resources possible under private access resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the private link resources possible under private access resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateLinkResourceListResultInner getPrivateLinkResources(String resourceGroupName, String privateAccessName); + + /** + * Gets information about a private endpoint connection under a private access resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a private endpoint connection under a private access resource along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getAPrivateEndpointConnectionWithResponse(String resourceGroupName, + String privateAccessName, String privateEndpointConnectionName, Context context); + + /** + * Gets information about a private endpoint connection under a private access resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @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 information about a private endpoint connection under a private access resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateEndpointConnectionInner getAPrivateEndpointConnection(String resourceGroupName, String privateAccessName, + String privateEndpointConnectionName); + + /** + * Deletes a private endpoint connection under a private access resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDeleteAPrivateEndpointConnection(String resourceGroupName, + String privateAccessName, String privateEndpointConnectionName); + + /** + * Deletes a private endpoint connection under a private access resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDeleteAPrivateEndpointConnection(String resourceGroupName, + String privateAccessName, String privateEndpointConnectionName, Context context); + + /** + * Deletes a private endpoint connection under a private access resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deleteAPrivateEndpointConnection(String resourceGroupName, String privateAccessName, + String privateEndpointConnectionName); + + /** + * Deletes a private endpoint connection under a private access resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deleteAPrivateEndpointConnection(String resourceGroupName, String privateAccessName, + String privateEndpointConnectionName, Context context); + + /** + * List information about private endpoint connections under a private access resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @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 private link resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listPrivateEndpointConnections(String resourceGroupName, + String privateAccessName); + + /** + * List information about private endpoint connections under a private access resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listPrivateEndpointConnections(String resourceGroupName, + String privateAccessName, Context context); +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ScenarioConfigurationsClient.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ScenarioConfigurationsClient.java new file mode 100644 index 000000000000..e17cb75a1a56 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ScenarioConfigurationsClient.java @@ -0,0 +1,388 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.chaos.fluent.models.ScenarioConfigurationInner; +import com.azure.resourcemanager.chaos.models.FixResourcePermissionsRequest; +import com.azure.resourcemanager.chaos.models.PermissionsFix; +import com.azure.resourcemanager.chaos.models.ScenarioConfigurationsExecuteResponse; +import com.azure.resourcemanager.chaos.models.Validation; + +/** + * An instance of this class provides access to all the operations defined in ScenarioConfigurationsClient. + */ +public interface ScenarioConfigurationsClient { + /** + * Get a scenario definition. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a scenario definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String workspaceName, + String scenarioName, String scenarioConfigurationName, Context context); + + /** + * Get a scenario definition. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @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 scenario definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ScenarioConfigurationInner get(String resourceGroupName, String workspaceName, String scenarioName, + String scenarioConfigurationName); + + /** + * Create or update a scenario definition. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of model that represents the scenario. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ScenarioConfigurationInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String scenarioName, String scenarioConfigurationName, + ScenarioConfigurationInner resource); + + /** + * Create or update a scenario definition. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of model that represents the scenario. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ScenarioConfigurationInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String scenarioName, String scenarioConfigurationName, + ScenarioConfigurationInner resource, Context context); + + /** + * Create or update a scenario definition. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return model that represents the scenario. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ScenarioConfigurationInner createOrUpdate(String resourceGroupName, String workspaceName, String scenarioName, + String scenarioConfigurationName, ScenarioConfigurationInner resource); + + /** + * Create or update a scenario definition. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return model that represents the scenario. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ScenarioConfigurationInner createOrUpdate(String resourceGroupName, String workspaceName, String scenarioName, + String scenarioConfigurationName, ScenarioConfigurationInner resource, Context context); + + /** + * Delete a scenario definition. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String scenarioName, + String scenarioConfigurationName); + + /** + * Delete a scenario definition. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String scenarioName, + String scenarioConfigurationName, Context context); + + /** + * Delete a scenario definition. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String scenarioName, String scenarioConfigurationName); + + /** + * Delete a scenario definition. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String scenarioName, String scenarioConfigurationName, + Context context); + + /** + * Get a list of scenario definitions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @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 scenario definitions as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listAll(String resourceGroupName, String workspaceName, + String scenarioName); + + /** + * Get a list of scenario definitions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of scenario definitions as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listAll(String resourceGroupName, String workspaceName, + String scenarioName, Context context); + + /** + * Execute the scenario execution with the given scenario configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ScenarioConfigurationsExecuteResponse executeWithResponse(String resourceGroupName, String workspaceName, + String scenarioName, String scenarioConfigurationName, Context context); + + /** + * Execute the scenario execution with the given scenario configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void execute(String resourceGroupName, String workspaceName, String scenarioName, String scenarioConfigurationName); + + /** + * Validate the given scenario configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Validation> beginValidate(String resourceGroupName, String workspaceName, + String scenarioName, String scenarioConfigurationName); + + /** + * Validate the given scenario configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Validation> beginValidate(String resourceGroupName, String workspaceName, + String scenarioName, String scenarioConfigurationName, Context context); + + /** + * Validate the given scenario configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Validation validate(String resourceGroupName, String workspaceName, String scenarioName, + String scenarioConfigurationName); + + /** + * Validate the given scenario configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Validation validate(String resourceGroupName, String workspaceName, String scenarioName, + String scenarioConfigurationName, Context context); + + /** + * Fixes resource permissions for the given scenario configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PermissionsFix> beginFixResourcePermissions(String resourceGroupName, + String workspaceName, String scenarioName, String scenarioConfigurationName); + + /** + * Fixes resource permissions for the given scenario configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @param body The body parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PermissionsFix> beginFixResourcePermissions(String resourceGroupName, + String workspaceName, String scenarioName, String scenarioConfigurationName, FixResourcePermissionsRequest body, + Context context); + + /** + * Fixes resource permissions for the given scenario configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PermissionsFix fixResourcePermissions(String resourceGroupName, String workspaceName, String scenarioName, + String scenarioConfigurationName); + + /** + * Fixes resource permissions for the given scenario configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @param body The body parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PermissionsFix fixResourcePermissions(String resourceGroupName, String workspaceName, String scenarioName, + String scenarioConfigurationName, FixResourcePermissionsRequest body, Context context); +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ScenarioRunsClient.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ScenarioRunsClient.java new file mode 100644 index 000000000000..e4ee58430f41 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ScenarioRunsClient.java @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.resourcemanager.chaos.fluent.models.ScenarioRunInner; +import com.azure.resourcemanager.chaos.models.ScenarioRunsCancelResponse; +import com.azure.resourcemanager.chaos.models.ScenarioRunsGetResponse; + +/** + * An instance of this class provides access to all the operations defined in ScenarioRunsClient. + */ +public interface ScenarioRunsClient { + /** + * Get a scenario run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param runId The name of the ScenarioRun. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a scenario run. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ScenarioRunsGetResponse getWithResponse(String resourceGroupName, String workspaceName, String scenarioName, + String runId, Context context); + + /** + * Get a scenario run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param runId The name of the ScenarioRun. + * @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 scenario run. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ScenarioRunInner get(String resourceGroupName, String workspaceName, String scenarioName, String runId); + + /** + * Get a list of scenario runs. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @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 scenario runs as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listAll(String resourceGroupName, String workspaceName, String scenarioName); + + /** + * Get a list of scenario runs. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of scenario runs as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listAll(String resourceGroupName, String workspaceName, String scenarioName, + Context context); + + /** + * Cancel the currently running scenario execution. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param runId The name of the ScenarioRun. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ScenarioRunsCancelResponse cancelWithResponse(String resourceGroupName, String workspaceName, String scenarioName, + String runId, Context context); + + /** + * Cancel the currently running scenario execution. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param runId The name of the ScenarioRun. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void cancel(String resourceGroupName, String workspaceName, String scenarioName, String runId); +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ScenariosClient.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ScenariosClient.java new file mode 100644 index 000000000000..760d47c04838 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ScenariosClient.java @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.chaos.fluent.models.ScenarioInner; + +/** + * An instance of this class provides access to all the operations defined in ScenariosClient. + */ +public interface ScenariosClient { + /** + * Get a scenario. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a scenario along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String workspaceName, String scenarioName, + Context context); + + /** + * Get a scenario. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @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 scenario. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ScenarioInner get(String resourceGroupName, String workspaceName, String scenarioName); + + /** + * Create or update a scenario. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return model that represents the scenario along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String scenarioName, ScenarioInner resource, Context context); + + /** + * Create or update a scenario. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return model that represents the scenario. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ScenarioInner createOrUpdate(String resourceGroupName, String workspaceName, String scenarioName, + ScenarioInner resource); + + /** + * Delete a scenario. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse(String resourceGroupName, String workspaceName, String scenarioName, + Context context); + + /** + * Delete a scenario. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String scenarioName); + + /** + * Get a list of scenarios. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace 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 scenarios as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listAll(String resourceGroupName, String workspaceName); + + /** + * Get a list of scenarios. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of scenarios as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listAll(String resourceGroupName, String workspaceName, Context context); +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/WorkspacesClient.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/WorkspacesClient.java new file mode 100644 index 000000000000..b250fd7b2c66 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/WorkspacesClient.java @@ -0,0 +1,328 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.chaos.fluent.models.WorkspaceInner; +import com.azure.resourcemanager.chaos.models.WorkspaceEvaluation; +import com.azure.resourcemanager.chaos.models.WorkspaceUpdate; + +/** + * An instance of this class provides access to all the operations defined in WorkspacesClient. + */ +public interface WorkspacesClient { + /** + * Get a Workspace resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Workspace resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String workspaceName, + Context context); + + /** + * Get a Workspace resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace 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 Workspace resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkspaceInner getByResourceGroup(String resourceGroupName, String workspaceName); + + /** + * Create or update a Workspace resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param resource Workspace resource to be created or updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of model that represents a Workspace resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkspaceInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, WorkspaceInner resource); + + /** + * Create or update a Workspace resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param resource Workspace resource to be created or updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of model that represents a Workspace resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkspaceInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, WorkspaceInner resource, Context context); + + /** + * Create or update a Workspace resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param resource Workspace resource to be created or updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return model that represents a Workspace resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceName, WorkspaceInner resource); + + /** + * Create or update a Workspace resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param resource Workspace resource to be created or updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return model that represents a Workspace resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceName, WorkspaceInner resource, + Context context); + + /** + * The operation to update a Workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param properties Parameters supplied to the Update Workspace operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of model that represents a Workspace resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkspaceInner> beginUpdate(String resourceGroupName, String workspaceName, + WorkspaceUpdate properties); + + /** + * The operation to update a Workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param properties Parameters supplied to the Update Workspace operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of model that represents a Workspace resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkspaceInner> beginUpdate(String resourceGroupName, String workspaceName, + WorkspaceUpdate properties, Context context); + + /** + * The operation to update a Workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param properties Parameters supplied to the Update Workspace operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return model that represents a Workspace resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkspaceInner update(String resourceGroupName, String workspaceName, WorkspaceUpdate properties); + + /** + * The operation to update a Workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param properties Parameters supplied to the Update Workspace operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return model that represents a Workspace resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkspaceInner update(String resourceGroupName, String workspaceName, WorkspaceUpdate properties, Context context); + + /** + * Delete a Workspace resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName); + + /** + * Delete a Workspace resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, Context context); + + /** + * Delete a Workspace resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName); + + /** + * Delete a Workspace resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, Context context); + + /** + * Get a list of Workspace resources in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Workspace resources in a resource group as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Get a list of Workspace resources in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param continuationToken String that sets the continuation token. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Workspace resources in a resource group as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, String continuationToken, + Context context); + + /** + * Get a list of all Workspace 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 all Workspace resources in a subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Get a list of all Workspace resources in a subscription. + * + * @param continuationToken String that sets the continuation token. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of all Workspace resources in a subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String continuationToken, Context context); + + /** + * Refreshes recommendation status for all scenarios in a given workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkspaceEvaluation> + beginRefreshRecommendations(String resourceGroupName, String workspaceName); + + /** + * Refreshes recommendation status for all scenarios in a given workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkspaceEvaluation> + beginRefreshRecommendations(String resourceGroupName, String workspaceName, Context context); + + /** + * Refreshes recommendation status for all scenarios in a given workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkspaceEvaluation refreshRecommendations(String resourceGroupName, String workspaceName); + + /** + * Refreshes recommendation status for all scenarios in a given workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkspaceEvaluation refreshRecommendations(String resourceGroupName, String workspaceName, Context context); +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ActionInner.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ActionInner.java new file mode 100644 index 000000000000..ec10fad5c109 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ActionInner.java @@ -0,0 +1,228 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.chaos.models.ActionKind; +import com.azure.resourcemanager.chaos.models.ActionPropertiesParametersSchema; +import com.azure.resourcemanager.chaos.models.ActionSupportedTargetType; +import java.io.IOException; +import java.util.List; + +/** + * Model that represents an Action resource. + */ +@Immutable +public final class ActionInner extends ProxyResource { + /* + * The properties of the action resource. + */ + private ActionProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ActionInner class. + */ + private ActionInner() { + } + + /** + * Get the innerProperties property: The properties of the action resource. + * + * @return the innerProperties value. + */ + private ActionProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the canonicalId property: Canonical identifier of the action (e.g., "microsoft-compute-shutdown/1.0"). + * + * @return the canonicalId value. + */ + public String canonicalId() { + return this.innerProperties() == null ? null : this.innerProperties().canonicalId(); + } + + /** + * Get the displayName property: Human-readable display name of the action. + * + * @return the displayName value. + */ + public String displayName() { + return this.innerProperties() == null ? null : this.innerProperties().displayName(); + } + + /** + * Get the description property: Description of what this action does. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Get the actionName property: The short name of the action (e.g., "Shutdown"). + * + * @return the actionName value. + */ + public String actionName() { + return this.innerProperties() == null ? null : this.innerProperties().actionName(); + } + + /** + * Get the version property: The version of the action (e.g., "1.0.0"). + * + * @return the version value. + */ + public String version() { + return this.innerProperties() == null ? null : this.innerProperties().version(); + } + + /** + * Get the actionType property: The type of the action. + * + * @return the actionType value. + */ + public ActionKind actionType() { + return this.innerProperties() == null ? null : this.innerProperties().actionType(); + } + + /** + * Get the supportedTargetTypes property: List of target types supported by this action. + * + * @return the supportedTargetTypes value. + */ + public List supportedTargetTypes() { + return this.innerProperties() == null ? null : this.innerProperties().supportedTargetTypes(); + } + + /** + * Get the parametersSchema property: JSON Schema describing the parameters for this action. + * + * @return the parametersSchema value. + */ + public ActionPropertiesParametersSchema parametersSchema() { + return this.innerProperties() == null ? null : this.innerProperties().parametersSchema(); + } + + /** + * Get the recommendedRoles property: Recommended Azure RBAC role definition GUIDs for this action. + * + * @return the recommendedRoles value. + */ + public List recommendedRoles() { + return this.innerProperties() == null ? null : this.innerProperties().recommendedRoles(); + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ActionInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ActionInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ActionInner. + */ + public static ActionInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ActionInner deserializedActionInner = new ActionInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedActionInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedActionInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedActionInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedActionInner.innerProperties = ActionProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedActionInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedActionInner; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ActionProperties.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ActionProperties.java new file mode 100644 index 000000000000..380d90cb4d6d --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ActionProperties.java @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.chaos.models.ActionKind; +import com.azure.resourcemanager.chaos.models.ActionPropertiesParametersSchema; +import com.azure.resourcemanager.chaos.models.ActionSupportedTargetType; +import java.io.IOException; +import java.util.List; + +/** + * Model that represents the properties of an Action resource. + */ +@Immutable +public final class ActionProperties implements JsonSerializable { + /* + * Canonical identifier of the action (e.g., "microsoft-compute-shutdown/1.0"). + */ + private String canonicalId; + + /* + * Human-readable display name of the action. + */ + private String displayName; + + /* + * Description of what this action does. + */ + private String description; + + /* + * The short name of the action (e.g., "Shutdown"). + */ + private String actionName; + + /* + * The version of the action (e.g., "1.0.0"). + */ + private String version; + + /* + * The type of the action. + */ + private ActionKind actionType; + + /* + * List of target types supported by this action. + */ + private List supportedTargetTypes; + + /* + * JSON Schema describing the parameters for this action. + */ + private ActionPropertiesParametersSchema parametersSchema; + + /* + * Recommended Azure RBAC role definition GUIDs for this action. + */ + private List recommendedRoles; + + /** + * Creates an instance of ActionProperties class. + */ + private ActionProperties() { + } + + /** + * Get the canonicalId property: Canonical identifier of the action (e.g., "microsoft-compute-shutdown/1.0"). + * + * @return the canonicalId value. + */ + public String canonicalId() { + return this.canonicalId; + } + + /** + * Get the displayName property: Human-readable display name of the action. + * + * @return the displayName value. + */ + public String displayName() { + return this.displayName; + } + + /** + * Get the description property: Description of what this action does. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Get the actionName property: The short name of the action (e.g., "Shutdown"). + * + * @return the actionName value. + */ + public String actionName() { + return this.actionName; + } + + /** + * Get the version property: The version of the action (e.g., "1.0.0"). + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Get the actionType property: The type of the action. + * + * @return the actionType value. + */ + public ActionKind actionType() { + return this.actionType; + } + + /** + * Get the supportedTargetTypes property: List of target types supported by this action. + * + * @return the supportedTargetTypes value. + */ + public List supportedTargetTypes() { + return this.supportedTargetTypes; + } + + /** + * Get the parametersSchema property: JSON Schema describing the parameters for this action. + * + * @return the parametersSchema value. + */ + public ActionPropertiesParametersSchema parametersSchema() { + return this.parametersSchema; + } + + /** + * Get the recommendedRoles property: Recommended Azure RBAC role definition GUIDs for this action. + * + * @return the recommendedRoles value. + */ + public List recommendedRoles() { + return this.recommendedRoles; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ActionProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ActionProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ActionProperties. + */ + public static ActionProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ActionProperties deserializedActionProperties = new ActionProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("canonicalId".equals(fieldName)) { + deserializedActionProperties.canonicalId = reader.getString(); + } else if ("displayName".equals(fieldName)) { + deserializedActionProperties.displayName = reader.getString(); + } else if ("description".equals(fieldName)) { + deserializedActionProperties.description = reader.getString(); + } else if ("actionName".equals(fieldName)) { + deserializedActionProperties.actionName = reader.getString(); + } else if ("version".equals(fieldName)) { + deserializedActionProperties.version = reader.getString(); + } else if ("actionType".equals(fieldName)) { + deserializedActionProperties.actionType = ActionKind.fromString(reader.getString()); + } else if ("supportedTargetTypes".equals(fieldName)) { + List supportedTargetTypes + = reader.readArray(reader1 -> ActionSupportedTargetType.fromJson(reader1)); + deserializedActionProperties.supportedTargetTypes = supportedTargetTypes; + } else if ("parametersSchema".equals(fieldName)) { + deserializedActionProperties.parametersSchema = ActionPropertiesParametersSchema.fromJson(reader); + } else if ("recommendedRoles".equals(fieldName)) { + List recommendedRoles = reader.readArray(reader1 -> reader1.getString()); + deserializedActionProperties.recommendedRoles = recommendedRoles; + } else { + reader.skipChildren(); + } + } + + return deserializedActionProperties; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ActionVersionInner.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ActionVersionInner.java new file mode 100644 index 000000000000..6f2461552e3d --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ActionVersionInner.java @@ -0,0 +1,228 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.chaos.models.ActionKind; +import com.azure.resourcemanager.chaos.models.ActionPropertiesParametersSchema; +import com.azure.resourcemanager.chaos.models.ActionSupportedTargetType; +import java.io.IOException; +import java.util.List; + +/** + * Model that represents an Action Version resource. + */ +@Immutable +public final class ActionVersionInner extends ProxyResource { + /* + * The properties of the action version resource. + */ + private ActionProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ActionVersionInner class. + */ + private ActionVersionInner() { + } + + /** + * Get the innerProperties property: The properties of the action version resource. + * + * @return the innerProperties value. + */ + private ActionProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the canonicalId property: Canonical identifier of the action (e.g., "microsoft-compute-shutdown/1.0"). + * + * @return the canonicalId value. + */ + public String canonicalId() { + return this.innerProperties() == null ? null : this.innerProperties().canonicalId(); + } + + /** + * Get the displayName property: Human-readable display name of the action. + * + * @return the displayName value. + */ + public String displayName() { + return this.innerProperties() == null ? null : this.innerProperties().displayName(); + } + + /** + * Get the description property: Description of what this action does. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Get the actionName property: The short name of the action (e.g., "Shutdown"). + * + * @return the actionName value. + */ + public String actionName() { + return this.innerProperties() == null ? null : this.innerProperties().actionName(); + } + + /** + * Get the version property: The version of the action (e.g., "1.0.0"). + * + * @return the version value. + */ + public String version() { + return this.innerProperties() == null ? null : this.innerProperties().version(); + } + + /** + * Get the actionType property: The type of the action. + * + * @return the actionType value. + */ + public ActionKind actionType() { + return this.innerProperties() == null ? null : this.innerProperties().actionType(); + } + + /** + * Get the supportedTargetTypes property: List of target types supported by this action. + * + * @return the supportedTargetTypes value. + */ + public List supportedTargetTypes() { + return this.innerProperties() == null ? null : this.innerProperties().supportedTargetTypes(); + } + + /** + * Get the parametersSchema property: JSON Schema describing the parameters for this action. + * + * @return the parametersSchema value. + */ + public ActionPropertiesParametersSchema parametersSchema() { + return this.innerProperties() == null ? null : this.innerProperties().parametersSchema(); + } + + /** + * Get the recommendedRoles property: Recommended Azure RBAC role definition GUIDs for this action. + * + * @return the recommendedRoles value. + */ + public List recommendedRoles() { + return this.innerProperties() == null ? null : this.innerProperties().recommendedRoles(); + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ActionVersionInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ActionVersionInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ActionVersionInner. + */ + public static ActionVersionInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ActionVersionInner deserializedActionVersionInner = new ActionVersionInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedActionVersionInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedActionVersionInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedActionVersionInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedActionVersionInner.innerProperties = ActionProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedActionVersionInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedActionVersionInner; + }); + } +} 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 3432b189c103..8a3dd8a11498 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 @@ -10,6 +10,7 @@ import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; +import com.azure.resourcemanager.chaos.models.ProvisioningState; import java.io.IOException; /** @@ -141,6 +142,16 @@ public String urn() { return this.innerProperties() == null ? null : this.innerProperties().urn(); } + /** + * Get the provisioningState property: Resource provisioning state. Not currently in use because resource is created + * synchronously. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + /** * {@inheritDoc} */ 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 e0d1dd7c640e..dd1e2f48bea3 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 @@ -9,6 +9,7 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; +import com.azure.resourcemanager.chaos.models.ProvisioningState; import java.io.IOException; /** @@ -41,6 +42,11 @@ public final class CapabilityProperties implements JsonSerializable { + DiscoveredResourceInner deserializedDiscoveredResourceInner = new DiscoveredResourceInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedDiscoveredResourceInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedDiscoveredResourceInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedDiscoveredResourceInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedDiscoveredResourceInner.properties = DiscoveredResourceProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedDiscoveredResourceInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDiscoveredResourceInner; + }); + } +} 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 b20271e1a9a5..b1a8502929c2 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 @@ -10,6 +10,7 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.chaos.models.ExperimentExecutionDetailsPropertiesRunInformation; +import com.azure.resourcemanager.chaos.models.ProvisioningState; import java.io.IOException; import java.time.OffsetDateTime; @@ -107,6 +108,15 @@ public OffsetDateTime stoppedAt() { return this.innerProperties() == null ? null : this.innerProperties().stoppedAt(); } + /** + * Get the provisioningState property: Resource provisioning state. Not currently in use for executions. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + /** * Get the failureReason property: The reason why the execution failed. * 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 087d02f9b479..88afdaccbade 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 @@ -11,6 +11,7 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.chaos.models.ExperimentExecutionDetailsPropertiesRunInformation; +import com.azure.resourcemanager.chaos.models.ProvisioningState; import java.io.IOException; import java.time.OffsetDateTime; @@ -35,6 +36,11 @@ public final class ExperimentExecutionDetailsProperties */ private OffsetDateTime stoppedAt; + /* + * Resource provisioning state. Not currently in use for executions. + */ + private ProvisioningState provisioningState; + /* * The reason why the execution failed. */ @@ -83,6 +89,15 @@ public OffsetDateTime stoppedAt() { return this.stoppedAt; } + /** + * Get the provisioningState property: Resource provisioning state. Not currently in use for executions. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + /** * Get the failureReason property: The reason why the execution failed. * @@ -143,6 +158,9 @@ public static ExperimentExecutionDetailsProperties fromJson(JsonReader jsonReade } else if ("stoppedAt".equals(fieldName)) { deserializedExperimentExecutionDetailsProperties.stoppedAt = reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("provisioningState".equals(fieldName)) { + deserializedExperimentExecutionDetailsProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); } else if ("failureReason".equals(fieldName)) { deserializedExperimentExecutionDetailsProperties.failureReason = reader.getString(); } else if ("lastActionAt".equals(fieldName)) { 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 e3a18e4cd2d4..fc628475dfb5 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 @@ -10,6 +10,7 @@ import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; +import com.azure.resourcemanager.chaos.models.ProvisioningState; import java.io.IOException; import java.time.OffsetDateTime; @@ -124,6 +125,15 @@ public OffsetDateTime stoppedAt() { return this.innerProperties() == null ? null : this.innerProperties().stoppedAt(); } + /** + * Get the provisioningState property: Resource provisioning state. Not currently in use for executions. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + /** * {@inheritDoc} */ 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 ea7254292a54..f001f2d99e80 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 @@ -10,6 +10,7 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; +import com.azure.resourcemanager.chaos.models.ProvisioningState; import java.io.IOException; import java.time.OffsetDateTime; @@ -33,6 +34,11 @@ public final class ExperimentExecutionProperties implements JsonSerializable CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("provisioningState".equals(fieldName)) { + deserializedExperimentExecutionProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); } else { reader.skipChildren(); } 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 b75db2b79acd..3cabe5c985cb 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 @@ -12,6 +12,7 @@ import com.azure.json.JsonWriter; import com.azure.resourcemanager.chaos.models.ChaosExperimentStep; import com.azure.resourcemanager.chaos.models.ChaosTargetSelector; +import com.azure.resourcemanager.chaos.models.CustomerDataStorageProperties; import com.azure.resourcemanager.chaos.models.ProvisioningState; import com.azure.resourcemanager.chaos.models.ResourceIdentity; import java.io.IOException; @@ -200,6 +201,31 @@ public ExperimentInner withSelectors(List selectors) { return this; } + /** + * Get the customerDataStorage property: Optional customer-managed Storage account where Experiment schema will be + * stored. + * + * @return the customerDataStorage value. + */ + public CustomerDataStorageProperties customerDataStorage() { + return this.innerProperties() == null ? null : this.innerProperties().customerDataStorage(); + } + + /** + * Set the customerDataStorage property: Optional customer-managed Storage account where Experiment schema will be + * stored. + * + * @param customerDataStorage the customerDataStorage value to set. + * @return the ExperimentInner object itself. + */ + public ExperimentInner withCustomerDataStorage(CustomerDataStorageProperties customerDataStorage) { + if (this.innerProperties() == null) { + this.innerProperties = new ExperimentProperties(); + } + this.innerProperties().withCustomerDataStorage(customerDataStorage); + return this; + } + /** * {@inheritDoc} */ 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 d540816e811d..4fda17bfff7b 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 @@ -11,6 +11,7 @@ import com.azure.json.JsonWriter; import com.azure.resourcemanager.chaos.models.ChaosExperimentStep; import com.azure.resourcemanager.chaos.models.ChaosTargetSelector; +import com.azure.resourcemanager.chaos.models.CustomerDataStorageProperties; import com.azure.resourcemanager.chaos.models.ProvisioningState; import java.io.IOException; import java.util.List; @@ -35,6 +36,11 @@ public final class ExperimentProperties implements JsonSerializable selectors; + /* + * Optional customer-managed Storage account where Experiment schema will be stored. + */ + private CustomerDataStorageProperties customerDataStorage; + /** * Creates an instance of ExperimentProperties class. */ @@ -90,6 +96,28 @@ public ExperimentProperties withSelectors(List selectors) { return this; } + /** + * Get the customerDataStorage property: Optional customer-managed Storage account where Experiment schema will be + * stored. + * + * @return the customerDataStorage value. + */ + public CustomerDataStorageProperties customerDataStorage() { + return this.customerDataStorage; + } + + /** + * Set the customerDataStorage property: Optional customer-managed Storage account where Experiment schema will be + * stored. + * + * @param customerDataStorage the customerDataStorage value to set. + * @return the ExperimentProperties object itself. + */ + public ExperimentProperties withCustomerDataStorage(CustomerDataStorageProperties customerDataStorage) { + this.customerDataStorage = customerDataStorage; + return this; + } + /** * {@inheritDoc} */ @@ -98,6 +126,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeArrayField("steps", this.steps, (writer, element) -> writer.writeJson(element)); jsonWriter.writeArrayField("selectors", this.selectors, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("customerDataStorage", this.customerDataStorage); return jsonWriter.writeEndObject(); } @@ -128,6 +157,9 @@ public static ExperimentProperties fromJson(JsonReader jsonReader) throws IOExce } else if ("provisioningState".equals(fieldName)) { deserializedExperimentProperties.provisioningState = ProvisioningState.fromString(reader.getString()); + } else if ("customerDataStorage".equals(fieldName)) { + deserializedExperimentProperties.customerDataStorage + = CustomerDataStorageProperties.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/PrivateAccessInner.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/PrivateAccessInner.java new file mode 100644 index 000000000000..bb1125ac78cb --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/PrivateAccessInner.java @@ -0,0 +1,181 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.chaos.models.PrivateAccessProperties; +import java.io.IOException; +import java.util.Map; + +/** + * PrivateAccesses tracked resource. + */ +@Fluent +public final class PrivateAccessInner extends Resource { + /* + * The resource-specific properties for this resource. + */ + private PrivateAccessProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of PrivateAccessInner class. + */ + public PrivateAccessInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public PrivateAccessProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the PrivateAccessInner object itself. + */ + public PrivateAccessInner withProperties(PrivateAccessProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public PrivateAccessInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public PrivateAccessInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateAccessInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateAccessInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PrivateAccessInner. + */ + public static PrivateAccessInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateAccessInner deserializedPrivateAccessInner = new PrivateAccessInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedPrivateAccessInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedPrivateAccessInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedPrivateAccessInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedPrivateAccessInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedPrivateAccessInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedPrivateAccessInner.properties = PrivateAccessProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedPrivateAccessInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateAccessInner; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/PrivateEndpointConnectionInner.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/PrivateEndpointConnectionInner.java new file mode 100644 index 000000000000..c9b424f10177 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/PrivateEndpointConnectionInner.java @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.chaos.models.PrivateEndpointConnectionProperties; +import java.io.IOException; + +/** + * The private endpoint connection resource. + */ +@Immutable +public final class PrivateEndpointConnectionInner extends ProxyResource { + /* + * Resource properties. + */ + private PrivateEndpointConnectionProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of PrivateEndpointConnectionInner class. + */ + private PrivateEndpointConnectionInner() { + } + + /** + * Get the properties property: Resource properties. + * + * @return the properties value. + */ + public PrivateEndpointConnectionProperties properties() { + return this.properties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateEndpointConnectionInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateEndpointConnectionInner if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PrivateEndpointConnectionInner. + */ + public static PrivateEndpointConnectionInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateEndpointConnectionInner deserializedPrivateEndpointConnectionInner + = new PrivateEndpointConnectionInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedPrivateEndpointConnectionInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedPrivateEndpointConnectionInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedPrivateEndpointConnectionInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedPrivateEndpointConnectionInner.properties + = PrivateEndpointConnectionProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedPrivateEndpointConnectionInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateEndpointConnectionInner; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/PrivateLinkResourceListResultInner.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/PrivateLinkResourceListResultInner.java new file mode 100644 index 000000000000..4f79affcfb86 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/PrivateLinkResourceListResultInner.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.chaos.models.PrivateLinkResource; +import java.io.IOException; +import java.util.List; + +/** + * A list of private link resources. + */ +@Immutable +public final class PrivateLinkResourceListResultInner implements JsonSerializable { + /* + * The PrivateLinkResource items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of PrivateLinkResourceListResultInner class. + */ + private PrivateLinkResourceListResultInner() { + } + + /** + * Get the value property: The PrivateLinkResource items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateLinkResourceListResultInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateLinkResourceListResultInner if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PrivateLinkResourceListResultInner. + */ + public static PrivateLinkResourceListResultInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateLinkResourceListResultInner deserializedPrivateLinkResourceListResultInner + = new PrivateLinkResourceListResultInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> PrivateLinkResource.fromJson(reader1)); + deserializedPrivateLinkResourceListResultInner.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedPrivateLinkResourceListResultInner.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateLinkResourceListResultInner; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ScenarioConfigurationInner.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ScenarioConfigurationInner.java new file mode 100644 index 000000000000..b01e259e58d2 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ScenarioConfigurationInner.java @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.chaos.models.ScenarioConfigurationProperties; +import java.io.IOException; + +/** + * Model that represents the scenario. + */ +@Fluent +public final class ScenarioConfigurationInner extends ProxyResource { + /* + * The properties of scenario definition. + */ + private ScenarioConfigurationProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ScenarioConfigurationInner class. + */ + public ScenarioConfigurationInner() { + } + + /** + * Get the properties property: The properties of scenario definition. + * + * @return the properties value. + */ + public ScenarioConfigurationProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The properties of scenario definition. + * + * @param properties the properties value to set. + * @return the ScenarioConfigurationInner object itself. + */ + public ScenarioConfigurationInner withProperties(ScenarioConfigurationProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ScenarioConfigurationInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ScenarioConfigurationInner if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ScenarioConfigurationInner. + */ + public static ScenarioConfigurationInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ScenarioConfigurationInner deserializedScenarioConfigurationInner = new ScenarioConfigurationInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedScenarioConfigurationInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedScenarioConfigurationInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedScenarioConfigurationInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedScenarioConfigurationInner.properties + = ScenarioConfigurationProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedScenarioConfigurationInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedScenarioConfigurationInner; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ScenarioInner.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ScenarioInner.java new file mode 100644 index 000000000000..00bf246e8f98 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ScenarioInner.java @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.chaos.models.ScenarioProperties; +import java.io.IOException; + +/** + * Model that represents the scenario. + */ +@Fluent +public final class ScenarioInner extends ProxyResource { + /* + * The properties of scenario. + */ + private ScenarioProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ScenarioInner class. + */ + public ScenarioInner() { + } + + /** + * Get the properties property: The properties of scenario. + * + * @return the properties value. + */ + public ScenarioProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The properties of scenario. + * + * @param properties the properties value to set. + * @return the ScenarioInner object itself. + */ + public ScenarioInner withProperties(ScenarioProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ScenarioInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ScenarioInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ScenarioInner. + */ + public static ScenarioInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ScenarioInner deserializedScenarioInner = new ScenarioInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedScenarioInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedScenarioInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedScenarioInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedScenarioInner.properties = ScenarioProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedScenarioInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedScenarioInner; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ScenarioRunInner.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ScenarioRunInner.java new file mode 100644 index 000000000000..34ba03b3b7b4 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ScenarioRunInner.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.chaos.models.ScenarioRunProperties; +import java.io.IOException; + +/** + * Model that represents the scenario run. + */ +@Immutable +public final class ScenarioRunInner extends ProxyResource { + /* + * The properties of scenario run. + */ + private ScenarioRunProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ScenarioRunInner class. + */ + private ScenarioRunInner() { + } + + /** + * Get the properties property: The properties of scenario run. + * + * @return the properties value. + */ + public ScenarioRunProperties properties() { + return this.properties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ScenarioRunInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ScenarioRunInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ScenarioRunInner. + */ + public static ScenarioRunInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ScenarioRunInner deserializedScenarioRunInner = new ScenarioRunInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedScenarioRunInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedScenarioRunInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedScenarioRunInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedScenarioRunInner.properties = ScenarioRunProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedScenarioRunInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedScenarioRunInner; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/WorkspaceInner.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/WorkspaceInner.java new file mode 100644 index 000000000000..cfe965d4f4c6 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/WorkspaceInner.java @@ -0,0 +1,210 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.chaos.models.ResourceIdentity; +import com.azure.resourcemanager.chaos.models.WorkspaceProperties; +import java.io.IOException; +import java.util.Map; + +/** + * Model that represents a Workspace resource. + */ +@Fluent +public final class WorkspaceInner extends Resource { + /* + * The managed service identities assigned to this resource. + */ + private ResourceIdentity identity; + + /* + * The properties of the Workspace resource. + */ + private WorkspaceProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of WorkspaceInner class. + */ + public WorkspaceInner() { + } + + /** + * Get the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + public ResourceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: The managed service identities assigned to this resource. + * + * @param identity the identity value to set. + * @return the WorkspaceInner object itself. + */ + public WorkspaceInner withIdentity(ResourceIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Get the properties property: The properties of the Workspace resource. + * + * @return the properties value. + */ + public WorkspaceProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The properties of the Workspace resource. + * + * @param properties the properties value to set. + * @return the WorkspaceInner object itself. + */ + public WorkspaceInner withProperties(WorkspaceProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public WorkspaceInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public WorkspaceInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeJsonField("identity", this.identity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WorkspaceInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkspaceInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the WorkspaceInner. + */ + public static WorkspaceInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkspaceInner deserializedWorkspaceInner = new WorkspaceInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedWorkspaceInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedWorkspaceInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedWorkspaceInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedWorkspaceInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedWorkspaceInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedWorkspaceInner.properties = WorkspaceProperties.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedWorkspaceInner.identity = ResourceIdentity.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedWorkspaceInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedWorkspaceInner; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ActionImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ActionImpl.java new file mode 100644 index 000000000000..d91920084984 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ActionImpl.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.chaos.fluent.models.ActionInner; +import com.azure.resourcemanager.chaos.models.Action; +import com.azure.resourcemanager.chaos.models.ActionKind; +import com.azure.resourcemanager.chaos.models.ActionPropertiesParametersSchema; +import com.azure.resourcemanager.chaos.models.ActionSupportedTargetType; +import java.util.Collections; +import java.util.List; + +public final class ActionImpl implements Action { + private ActionInner innerObject; + + private final com.azure.resourcemanager.chaos.ChaosManager serviceManager; + + ActionImpl(ActionInner innerObject, com.azure.resourcemanager.chaos.ChaosManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String canonicalId() { + return this.innerModel().canonicalId(); + } + + public String displayName() { + return this.innerModel().displayName(); + } + + public String description() { + return this.innerModel().description(); + } + + public String actionName() { + return this.innerModel().actionName(); + } + + public String version() { + return this.innerModel().version(); + } + + public ActionKind actionType() { + return this.innerModel().actionType(); + } + + public List supportedTargetTypes() { + List inner = this.innerModel().supportedTargetTypes(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public ActionPropertiesParametersSchema parametersSchema() { + return this.innerModel().parametersSchema(); + } + + public List recommendedRoles() { + List inner = this.innerModel().recommendedRoles(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public ActionInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.chaos.ChaosManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ActionVersionImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ActionVersionImpl.java new file mode 100644 index 000000000000..d785a4de0ee0 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ActionVersionImpl.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.chaos.fluent.models.ActionVersionInner; +import com.azure.resourcemanager.chaos.models.ActionKind; +import com.azure.resourcemanager.chaos.models.ActionPropertiesParametersSchema; +import com.azure.resourcemanager.chaos.models.ActionSupportedTargetType; +import com.azure.resourcemanager.chaos.models.ActionVersion; +import java.util.Collections; +import java.util.List; + +public final class ActionVersionImpl implements ActionVersion { + private ActionVersionInner innerObject; + + private final com.azure.resourcemanager.chaos.ChaosManager serviceManager; + + ActionVersionImpl(ActionVersionInner innerObject, com.azure.resourcemanager.chaos.ChaosManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String canonicalId() { + return this.innerModel().canonicalId(); + } + + public String displayName() { + return this.innerModel().displayName(); + } + + public String description() { + return this.innerModel().description(); + } + + public String actionName() { + return this.innerModel().actionName(); + } + + public String version() { + return this.innerModel().version(); + } + + public ActionKind actionType() { + return this.innerModel().actionType(); + } + + public List supportedTargetTypes() { + List inner = this.innerModel().supportedTargetTypes(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public ActionPropertiesParametersSchema parametersSchema() { + return this.innerModel().parametersSchema(); + } + + public List recommendedRoles() { + List inner = this.innerModel().recommendedRoles(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public ActionVersionInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.chaos.ChaosManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ActionVersionsClientImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ActionVersionsClientImpl.java new file mode 100644 index 000000000000..c4035549a0d1 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ActionVersionsClientImpl.java @@ -0,0 +1,388 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.chaos.fluent.ActionVersionsClient; +import com.azure.resourcemanager.chaos.fluent.models.ActionVersionInner; +import com.azure.resourcemanager.chaos.implementation.models.ActionVersionListResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ActionVersionsClient. + */ +public final class ActionVersionsClientImpl implements ActionVersionsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ActionVersionsService service; + + /** + * The service client containing this operation class. + */ + private final ChaosManagementClientImpl client; + + /** + * Initializes an instance of ActionVersionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ActionVersionsClientImpl(ChaosManagementClientImpl client) { + this.service + = RestProxy.create(ActionVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ChaosManagementClientActionVersions to be used by the proxy service + * to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "ChaosManagementClientActionVersions") + public interface ActionVersionsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{location}/actions/{actionName}/versions/{versionName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @PathParam("actionName") String actionName, + @PathParam("versionName") String versionName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{location}/actions/{actionName}/versions/{versionName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @PathParam("actionName") String actionName, + @PathParam("versionName") String versionName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{location}/actions/{actionName}/versions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @PathParam("actionName") String actionName, + @QueryParam("continuationToken") String continuationToken, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{location}/actions/{actionName}/versions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @PathParam("actionName") String actionName, + @QueryParam("continuationToken") String continuationToken, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get an Action Version resource for a given location and action. + * + * @param location The name of the Azure region. + * @param actionName String that represents an Action resource name. + * @param versionName String that represents an Action Version 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 an Action Version resource for a given location and action along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String location, String actionName, + String versionName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, actionName, versionName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get an Action Version resource for a given location and action. + * + * @param location The name of the Azure region. + * @param actionName String that represents an Action resource name. + * @param versionName String that represents an Action Version 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 an Action Version resource for a given location and action on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String location, String actionName, String versionName) { + return getWithResponseAsync(location, actionName, versionName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get an Action Version resource for a given location and action. + * + * @param location The name of the Azure region. + * @param actionName String that represents an Action resource name. + * @param versionName String that represents an Action Version 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 an Action Version resource for a given location and action along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String location, String actionName, String versionName, + Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + location, actionName, versionName, accept, context); + } + + /** + * Get an Action Version resource for a given location and action. + * + * @param location The name of the Azure region. + * @param actionName String that represents an Action resource name. + * @param versionName String that represents an Action Version 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 an Action Version resource for a given location and action. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ActionVersionInner get(String location, String actionName, String versionName) { + return getWithResponse(location, actionName, versionName, Context.NONE).getValue(); + } + + /** + * Get a list of Action Version resources for a given location and action. + * + * @param location The name of the Azure region. + * @param actionName String that represents an Action 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 Action Version resources for a given location and action along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String location, String actionName, + String continuationToken) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, actionName, 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 Action Version resources for a given location and action. + * + * @param location The name of the Azure region. + * @param actionName String that represents an Action 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 Action Version resources for a given location and action as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String location, String actionName, String continuationToken) { + return new PagedFlux<>(() -> listSinglePageAsync(location, actionName, continuationToken), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of Action Version resources for a given location and action. + * + * @param location The name of the Azure region. + * @param actionName String that represents an Action 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 Action Version resources for a given location and action as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String location, String actionName) { + final String continuationToken = null; + return new PagedFlux<>(() -> listSinglePageAsync(location, actionName, continuationToken), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of Action Version resources for a given location and action. + * + * @param location The name of the Azure region. + * @param actionName String that represents an Action 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 Action Version resources for a given location and action along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String location, String actionName, + String continuationToken) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, actionName, continuationToken, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get a list of Action Version resources for a given location and action. + * + * @param location The name of the Azure region. + * @param actionName String that represents an Action resource name. + * @param continuationToken String that sets the continuation token. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Action Version resources for a given location and action along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String location, String actionName, + String continuationToken, Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, actionName, continuationToken, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get a list of Action Version resources for a given location and action. + * + * @param location The name of the Azure region. + * @param actionName String that represents an Action 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 Action Version resources for a given location and action as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String location, String actionName) { + final String continuationToken = null; + return new PagedIterable<>(() -> listSinglePage(location, actionName, continuationToken), + nextLink -> listNextSinglePage(nextLink)); + } + + /** + * Get a list of Action Version resources for a given location and action. + * + * @param location The name of the Azure region. + * @param actionName String that represents an Action resource name. + * @param continuationToken String that sets the continuation token. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Action Version resources for a given location and action as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String location, String actionName, String continuationToken, + Context context) { + return new PagedIterable<>(() -> listSinglePage(location, actionName, continuationToken, context), + nextLink -> listNextSinglePage(nextLink, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Action Version resources for a given location and action along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Action Version resources for a given location and action along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return 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. + * @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 Action Version resources for a given location and action along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return 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/ActionVersionsImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ActionVersionsImpl.java new file mode 100644 index 000000000000..c08a33fbb5ac --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ActionVersionsImpl.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.chaos.fluent.ActionVersionsClient; +import com.azure.resourcemanager.chaos.fluent.models.ActionVersionInner; +import com.azure.resourcemanager.chaos.models.ActionVersion; +import com.azure.resourcemanager.chaos.models.ActionVersions; + +public final class ActionVersionsImpl implements ActionVersions { + private static final ClientLogger LOGGER = new ClientLogger(ActionVersionsImpl.class); + + private final ActionVersionsClient innerClient; + + private final com.azure.resourcemanager.chaos.ChaosManager serviceManager; + + public ActionVersionsImpl(ActionVersionsClient innerClient, + com.azure.resourcemanager.chaos.ChaosManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String location, String actionName, String versionName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(location, actionName, versionName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ActionVersionImpl(inner.getValue(), this.manager())); + } + + public ActionVersion get(String location, String actionName, String versionName) { + ActionVersionInner inner = this.serviceClient().get(location, actionName, versionName); + if (inner != null) { + return new ActionVersionImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable list(String location, String actionName) { + PagedIterable inner = this.serviceClient().list(location, actionName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ActionVersionImpl(inner1, this.manager())); + } + + public PagedIterable list(String location, String actionName, String continuationToken, + Context context) { + PagedIterable inner + = this.serviceClient().list(location, actionName, continuationToken, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ActionVersionImpl(inner1, this.manager())); + } + + private ActionVersionsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.chaos.ChaosManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ActionsClientImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ActionsClientImpl.java new file mode 100644 index 000000000000..41a07f6b13ca --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ActionsClientImpl.java @@ -0,0 +1,363 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.chaos.fluent.ActionsClient; +import com.azure.resourcemanager.chaos.fluent.models.ActionInner; +import com.azure.resourcemanager.chaos.implementation.models.ActionListResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ActionsClient. + */ +public final class ActionsClientImpl implements ActionsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ActionsService service; + + /** + * The service client containing this operation class. + */ + private final ChaosManagementClientImpl client; + + /** + * Initializes an instance of ActionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ActionsClientImpl(ChaosManagementClientImpl client) { + this.service = RestProxy.create(ActionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ChaosManagementClientActions to be used by the proxy service to + * perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "ChaosManagementClientActions") + public interface ActionsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{location}/actions/{actionName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @PathParam("actionName") String actionName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{location}/actions/{actionName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @PathParam("actionName") String actionName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{location}/actions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @QueryParam("continuationToken") String continuationToken, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{location}/actions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @QueryParam("continuationToken") String continuationToken, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get an Action resource for a given location. + * + * @param location The name of the Azure region. + * @param actionName String that represents an Action 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 an Action resource for a given location along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String location, String actionName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, actionName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get an Action resource for a given location. + * + * @param location The name of the Azure region. + * @param actionName String that represents an Action 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 an Action resource for a given location on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String location, String actionName) { + return getWithResponseAsync(location, actionName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get an Action resource for a given location. + * + * @param location The name of the Azure region. + * @param actionName String that represents an Action 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 an Action resource for a given location along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String location, String actionName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + location, actionName, accept, context); + } + + /** + * Get an Action resource for a given location. + * + * @param location The name of the Azure region. + * @param actionName String that represents an Action 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 an Action resource for a given location. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ActionInner get(String location, String actionName) { + return getWithResponse(location, actionName, Context.NONE).getValue(); + } + + /** + * Get a list of Action resources for a given location. + * + * @param location The name of the Azure region. + * @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 Action resources for a given location along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String location, String continuationToken) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, 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 Action resources for a given location. + * + * @param location The name of the Azure region. + * @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 Action resources for a given location as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String location, String continuationToken) { + return new PagedFlux<>(() -> listSinglePageAsync(location, continuationToken), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of Action resources for a given location. + * + * @param location The name of the Azure region. + * @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 Action resources for a given location as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String location) { + final String continuationToken = null; + return new PagedFlux<>(() -> listSinglePageAsync(location, continuationToken), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of Action resources for a given location. + * + * @param location The name of the Azure region. + * @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 Action resources for a given location along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String location, String continuationToken) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, continuationToken, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get a list of Action resources for a given location. + * + * @param location The name of the Azure region. + * @param continuationToken String that sets the continuation token. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Action resources for a given location along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String location, String continuationToken, Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, continuationToken, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get a list of Action resources for a given location. + * + * @param location The name of the Azure region. + * @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 Action resources for a given location as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String location) { + final String continuationToken = null; + return new PagedIterable<>(() -> listSinglePage(location, continuationToken), + nextLink -> listNextSinglePage(nextLink)); + } + + /** + * Get a list of Action resources for a given location. + * + * @param location The name of the Azure region. + * @param continuationToken String that sets the continuation token. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Action resources for a given location as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String location, String continuationToken, Context context) { + return new PagedIterable<>(() -> listSinglePage(location, continuationToken, context), + nextLink -> listNextSinglePage(nextLink, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Action resources for a given location along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Action resources for a given location along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return 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. + * @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 Action resources for a given location along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return 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/ActionsImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ActionsImpl.java new file mode 100644 index 000000000000..5420e2af8238 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ActionsImpl.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.chaos.fluent.ActionsClient; +import com.azure.resourcemanager.chaos.fluent.models.ActionInner; +import com.azure.resourcemanager.chaos.models.Action; +import com.azure.resourcemanager.chaos.models.Actions; + +public final class ActionsImpl implements Actions { + private static final ClientLogger LOGGER = new ClientLogger(ActionsImpl.class); + + private final ActionsClient innerClient; + + private final com.azure.resourcemanager.chaos.ChaosManager serviceManager; + + public ActionsImpl(ActionsClient innerClient, com.azure.resourcemanager.chaos.ChaosManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String location, String actionName, Context context) { + Response inner = this.serviceClient().getWithResponse(location, actionName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ActionImpl(inner.getValue(), this.manager())); + } + + public Action get(String location, String actionName) { + ActionInner inner = this.serviceClient().get(location, actionName); + if (inner != null) { + return new ActionImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable list(String location) { + PagedIterable inner = this.serviceClient().list(location); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ActionImpl(inner1, this.manager())); + } + + public PagedIterable list(String location, String continuationToken, Context context) { + PagedIterable inner = this.serviceClient().list(location, continuationToken, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ActionImpl(inner1, this.manager())); + } + + private ActionsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.chaos.ChaosManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilityImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilityImpl.java index 40059821e9df..2a9bab58bd75 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilityImpl.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilityImpl.java @@ -7,6 +7,7 @@ import com.azure.core.management.SystemData; import com.azure.resourcemanager.chaos.fluent.models.CapabilityInner; import com.azure.resourcemanager.chaos.models.Capability; +import com.azure.resourcemanager.chaos.models.ProvisioningState; public final class CapabilityImpl implements Capability { private CapabilityInner innerObject; @@ -54,6 +55,10 @@ public String urn() { return this.innerModel().urn(); } + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + public CapabilityInner innerModel() { return this.innerObject; } 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 b5a8ee5cd321..1a2c92cb602e 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 @@ -26,14 +26,22 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.core.util.serializer.SerializerAdapter; import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.chaos.fluent.ActionVersionsClient; +import com.azure.resourcemanager.chaos.fluent.ActionsClient; import com.azure.resourcemanager.chaos.fluent.CapabilitiesClient; import com.azure.resourcemanager.chaos.fluent.CapabilityTypesClient; import com.azure.resourcemanager.chaos.fluent.ChaosManagementClient; +import com.azure.resourcemanager.chaos.fluent.DiscoveredResourcesClient; import com.azure.resourcemanager.chaos.fluent.ExperimentsClient; import com.azure.resourcemanager.chaos.fluent.OperationStatusesClient; import com.azure.resourcemanager.chaos.fluent.OperationsClient; +import com.azure.resourcemanager.chaos.fluent.PrivateAccessesClient; +import com.azure.resourcemanager.chaos.fluent.ScenarioConfigurationsClient; +import com.azure.resourcemanager.chaos.fluent.ScenarioRunsClient; +import com.azure.resourcemanager.chaos.fluent.ScenariosClient; import com.azure.resourcemanager.chaos.fluent.TargetTypesClient; import com.azure.resourcemanager.chaos.fluent.TargetsClient; +import com.azure.resourcemanager.chaos.fluent.WorkspacesClient; import java.io.IOException; import java.lang.reflect.Type; import java.nio.ByteBuffer; @@ -202,6 +210,48 @@ public ExperimentsClient getExperiments() { return this.experiments; } + /** + * The PrivateAccessesClient object to access its operations. + */ + private final PrivateAccessesClient privateAccesses; + + /** + * Gets the PrivateAccessesClient object to access its operations. + * + * @return the PrivateAccessesClient object. + */ + public PrivateAccessesClient getPrivateAccesses() { + return this.privateAccesses; + } + + /** + * The ActionsClient object to access its operations. + */ + private final ActionsClient actions; + + /** + * Gets the ActionsClient object to access its operations. + * + * @return the ActionsClient object. + */ + public ActionsClient getActions() { + return this.actions; + } + + /** + * The ActionVersionsClient object to access its operations. + */ + private final ActionVersionsClient actionVersions; + + /** + * Gets the ActionVersionsClient object to access its operations. + * + * @return the ActionVersionsClient object. + */ + public ActionVersionsClient getActionVersions() { + return this.actionVersions; + } + /** * The TargetTypesClient object to access its operations. */ @@ -230,6 +280,76 @@ public OperationStatusesClient getOperationStatuses() { return this.operationStatuses; } + /** + * The WorkspacesClient object to access its operations. + */ + private final WorkspacesClient workspaces; + + /** + * Gets the WorkspacesClient object to access its operations. + * + * @return the WorkspacesClient object. + */ + public WorkspacesClient getWorkspaces() { + return this.workspaces; + } + + /** + * The DiscoveredResourcesClient object to access its operations. + */ + private final DiscoveredResourcesClient discoveredResources; + + /** + * Gets the DiscoveredResourcesClient object to access its operations. + * + * @return the DiscoveredResourcesClient object. + */ + public DiscoveredResourcesClient getDiscoveredResources() { + return this.discoveredResources; + } + + /** + * The ScenariosClient object to access its operations. + */ + private final ScenariosClient scenarios; + + /** + * Gets the ScenariosClient object to access its operations. + * + * @return the ScenariosClient object. + */ + public ScenariosClient getScenarios() { + return this.scenarios; + } + + /** + * The ScenarioRunsClient object to access its operations. + */ + private final ScenarioRunsClient scenarioRuns; + + /** + * Gets the ScenarioRunsClient object to access its operations. + * + * @return the ScenarioRunsClient object. + */ + public ScenarioRunsClient getScenarioRuns() { + return this.scenarioRuns; + } + + /** + * The ScenarioConfigurationsClient object to access its operations. + */ + private final ScenarioConfigurationsClient scenarioConfigurations; + + /** + * Gets the ScenarioConfigurationsClient object to access its operations. + * + * @return the ScenarioConfigurationsClient object. + */ + public ScenarioConfigurationsClient getScenarioConfigurations() { + return this.scenarioConfigurations; + } + /** * Initializes an instance of ChaosManagementClient client. * @@ -247,14 +367,22 @@ public OperationStatusesClient getOperationStatuses() { this.defaultPollInterval = defaultPollInterval; this.endpoint = endpoint; this.subscriptionId = subscriptionId; - this.apiVersion = "2025-01-01"; + this.apiVersion = "2026-05-01-preview"; this.capabilities = new CapabilitiesClientImpl(this); this.operations = new OperationsClientImpl(this); this.targets = new TargetsClientImpl(this); this.capabilityTypes = new CapabilityTypesClientImpl(this); this.experiments = new ExperimentsClientImpl(this); + this.privateAccesses = new PrivateAccessesClientImpl(this); + this.actions = new ActionsClientImpl(this); + this.actionVersions = new ActionVersionsClientImpl(this); this.targetTypes = new TargetTypesClientImpl(this); this.operationStatuses = new OperationStatusesClientImpl(this); + this.workspaces = new WorkspacesClientImpl(this); + this.discoveredResources = new DiscoveredResourcesClientImpl(this); + this.scenarios = new ScenariosClientImpl(this); + this.scenarioRuns = new ScenarioRunsClientImpl(this); + this.scenarioConfigurations = new ScenarioConfigurationsClientImpl(this); } /** diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/DiscoveredResourceImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/DiscoveredResourceImpl.java new file mode 100644 index 000000000000..2e501f80a294 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/DiscoveredResourceImpl.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.chaos.fluent.models.DiscoveredResourceInner; +import com.azure.resourcemanager.chaos.models.DiscoveredResource; +import com.azure.resourcemanager.chaos.models.DiscoveredResourceProperties; + +public final class DiscoveredResourceImpl implements DiscoveredResource { + private DiscoveredResourceInner innerObject; + + private final com.azure.resourcemanager.chaos.ChaosManager serviceManager; + + DiscoveredResourceImpl(DiscoveredResourceInner innerObject, + com.azure.resourcemanager.chaos.ChaosManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public DiscoveredResourceProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public DiscoveredResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.chaos.ChaosManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/DiscoveredResourcesClientImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/DiscoveredResourcesClientImpl.java new file mode 100644 index 000000000000..b80d74db007e --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/DiscoveredResourcesClientImpl.java @@ -0,0 +1,366 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.chaos.fluent.DiscoveredResourcesClient; +import com.azure.resourcemanager.chaos.fluent.models.DiscoveredResourceInner; +import com.azure.resourcemanager.chaos.implementation.models.DiscoveredResourceListResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in DiscoveredResourcesClient. + */ +public final class DiscoveredResourcesClientImpl implements DiscoveredResourcesClient { + /** + * The proxy service used to perform REST calls. + */ + private final DiscoveredResourcesService service; + + /** + * The service client containing this operation class. + */ + private final ChaosManagementClientImpl client; + + /** + * Initializes an instance of DiscoveredResourcesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + DiscoveredResourcesClientImpl(ChaosManagementClientImpl client) { + this.service = RestProxy.create(DiscoveredResourcesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ChaosManagementClientDiscoveredResources to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "ChaosManagementClientDiscoveredResources") + public interface DiscoveredResourcesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/discoveredResources/{discoveredResourceName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("discoveredResourceName") String discoveredResourceName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/discoveredResources/{discoveredResourceName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("discoveredResourceName") String discoveredResourceName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/discoveredResources") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByWorkspace(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/discoveredResources") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByWorkspaceSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByWorkspaceNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByWorkspaceNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get a discovered resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param discoveredResourceName Name of the discovered resource. + * @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 discovered resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, + String discoveredResourceName) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, discoveredResourceName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a discovered resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param discoveredResourceName Name of the discovered resource. + * @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 discovered resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String workspaceName, + String discoveredResourceName) { + return getWithResponseAsync(resourceGroupName, workspaceName, discoveredResourceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a discovered resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param discoveredResourceName Name of the discovered resource. + * @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 discovered resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String workspaceName, + String discoveredResourceName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, discoveredResourceName, accept, context); + } + + /** + * Get a discovered resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param discoveredResourceName Name of the discovered resource. + * @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 discovered resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DiscoveredResourceInner get(String resourceGroupName, String workspaceName, String discoveredResourceName) { + return getWithResponse(resourceGroupName, workspaceName, discoveredResourceName, Context.NONE).getValue(); + } + + /** + * Get a list of discovered resources for a workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace 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 discovered resources for a workspace along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByWorkspaceSinglePageAsync(String resourceGroupName, + String workspaceName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByWorkspace(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, 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 discovered resources for a workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace 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 discovered resources for a workspace as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByWorkspaceAsync(String resourceGroupName, String workspaceName) { + return new PagedFlux<>(() -> listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName), + nextLink -> listByWorkspaceNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of discovered resources for a workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace 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 discovered resources for a workspace along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByWorkspaceSinglePage(String resourceGroupName, + String workspaceName) { + final String accept = "application/json"; + Response res + = service.listByWorkspaceSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get a list of discovered resources for a workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of discovered resources for a workspace along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByWorkspaceSinglePage(String resourceGroupName, + String workspaceName, Context context) { + final String accept = "application/json"; + Response res + = service.listByWorkspaceSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get a list of discovered resources for a workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace 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 discovered resources for a workspace as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName) { + return new PagedIterable<>(() -> listByWorkspaceSinglePage(resourceGroupName, workspaceName), + nextLink -> listByWorkspaceNextSinglePage(nextLink)); + } + + /** + * Get a list of discovered resources for a workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of discovered resources for a workspace as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName, + Context context) { + return new PagedIterable<>(() -> listByWorkspaceSinglePage(resourceGroupName, workspaceName, context), + nextLink -> listByWorkspaceNextSinglePage(nextLink, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of discovered resources for a workspace along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByWorkspaceNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByWorkspaceNext(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. + * @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 discovered resources for a workspace along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByWorkspaceNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByWorkspaceNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return 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. + * @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 discovered resources for a workspace along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByWorkspaceNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listByWorkspaceNextSync(nextLink, this.client.getEndpoint(), accept, context); + return 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/DiscoveredResourcesImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/DiscoveredResourcesImpl.java new file mode 100644 index 000000000000..a7d58195d0ff --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/DiscoveredResourcesImpl.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.chaos.fluent.DiscoveredResourcesClient; +import com.azure.resourcemanager.chaos.fluent.models.DiscoveredResourceInner; +import com.azure.resourcemanager.chaos.models.DiscoveredResource; +import com.azure.resourcemanager.chaos.models.DiscoveredResources; + +public final class DiscoveredResourcesImpl implements DiscoveredResources { + private static final ClientLogger LOGGER = new ClientLogger(DiscoveredResourcesImpl.class); + + private final DiscoveredResourcesClient innerClient; + + private final com.azure.resourcemanager.chaos.ChaosManager serviceManager; + + public DiscoveredResourcesImpl(DiscoveredResourcesClient innerClient, + com.azure.resourcemanager.chaos.ChaosManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String workspaceName, + String discoveredResourceName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, discoveredResourceName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new DiscoveredResourceImpl(inner.getValue(), this.manager())); + } + + public DiscoveredResource get(String resourceGroupName, String workspaceName, String discoveredResourceName) { + DiscoveredResourceInner inner + = this.serviceClient().get(resourceGroupName, workspaceName, discoveredResourceName); + if (inner != null) { + return new DiscoveredResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName) { + PagedIterable inner + = this.serviceClient().listByWorkspace(resourceGroupName, workspaceName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DiscoveredResourceImpl(inner1, this.manager())); + } + + public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName, + Context context) { + PagedIterable inner + = this.serviceClient().listByWorkspace(resourceGroupName, workspaceName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DiscoveredResourceImpl(inner1, this.manager())); + } + + private DiscoveredResourcesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.chaos.ChaosManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentExecutionDetailsImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentExecutionDetailsImpl.java index 6b18b4730ecb..1a95fa3bdb00 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 @@ -7,6 +7,7 @@ import com.azure.resourcemanager.chaos.fluent.models.ExperimentExecutionDetailsInner; import com.azure.resourcemanager.chaos.models.ExperimentExecutionDetails; import com.azure.resourcemanager.chaos.models.ExperimentExecutionDetailsPropertiesRunInformation; +import com.azure.resourcemanager.chaos.models.ProvisioningState; import java.time.OffsetDateTime; public final class ExperimentExecutionDetailsImpl implements ExperimentExecutionDetails { @@ -44,6 +45,10 @@ public OffsetDateTime stoppedAt() { return this.innerModel().stoppedAt(); } + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + public String failureReason() { return this.innerModel().failureReason(); } 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 14192a344337..764d2aecc10f 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 @@ -7,6 +7,7 @@ import com.azure.core.management.SystemData; import com.azure.resourcemanager.chaos.fluent.models.ExperimentExecutionInner; import com.azure.resourcemanager.chaos.models.ExperimentExecution; +import com.azure.resourcemanager.chaos.models.ProvisioningState; import java.time.OffsetDateTime; public final class ExperimentExecutionImpl implements ExperimentExecution { @@ -48,6 +49,10 @@ public OffsetDateTime stoppedAt() { return this.innerModel().stoppedAt(); } + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + public ExperimentExecutionInner innerModel() { return this.innerObject; } 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 4c213f401604..ec59c3b12dc1 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 @@ -10,6 +10,7 @@ import com.azure.resourcemanager.chaos.fluent.models.ExperimentInner; import com.azure.resourcemanager.chaos.models.ChaosExperimentStep; import com.azure.resourcemanager.chaos.models.ChaosTargetSelector; +import com.azure.resourcemanager.chaos.models.CustomerDataStorageProperties; import com.azure.resourcemanager.chaos.models.Experiment; import com.azure.resourcemanager.chaos.models.ExperimentUpdate; import com.azure.resourcemanager.chaos.models.ProvisioningState; @@ -78,6 +79,10 @@ public List selectors() { } } + public CustomerDataStorageProperties customerDataStorage() { + return this.innerModel().customerDataStorage(); + } + public Region region() { return Region.fromName(this.regionName()); } @@ -227,6 +232,11 @@ public ExperimentImpl withIdentity(ResourceIdentity identity) { } } + public ExperimentImpl withCustomerDataStorage(CustomerDataStorageProperties customerDataStorage) { + this.innerModel().withCustomerDataStorage(customerDataStorage); + return this; + } + private boolean isInCreateMode() { return this.innerModel() == null || this.innerModel().id() == null; } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/PrivateAccessImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/PrivateAccessImpl.java new file mode 100644 index 000000000000..a5a734ea7f38 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/PrivateAccessImpl.java @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.chaos.fluent.models.PrivateAccessInner; +import com.azure.resourcemanager.chaos.models.PrivateAccess; +import com.azure.resourcemanager.chaos.models.PrivateAccessPatch; +import com.azure.resourcemanager.chaos.models.PrivateAccessProperties; +import java.util.Collections; +import java.util.Map; + +public final class PrivateAccessImpl implements PrivateAccess, PrivateAccess.Definition, PrivateAccess.Update { + private PrivateAccessInner innerObject; + + private final com.azure.resourcemanager.chaos.ChaosManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public PrivateAccessProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public PrivateAccessInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.chaos.ChaosManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String privateAccessName; + + private PrivateAccessPatch updateProperties; + + public PrivateAccessImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public PrivateAccess create() { + this.innerObject = serviceManager.serviceClient() + .getPrivateAccesses() + .createOrUpdate(resourceGroupName, privateAccessName, this.innerModel(), Context.NONE); + return this; + } + + public PrivateAccess create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getPrivateAccesses() + .createOrUpdate(resourceGroupName, privateAccessName, this.innerModel(), context); + return this; + } + + PrivateAccessImpl(String name, com.azure.resourcemanager.chaos.ChaosManager serviceManager) { + this.innerObject = new PrivateAccessInner(); + this.serviceManager = serviceManager; + this.privateAccessName = name; + } + + public PrivateAccessImpl update() { + this.updateProperties = new PrivateAccessPatch(); + return this; + } + + public PrivateAccess apply() { + this.innerObject = serviceManager.serviceClient() + .getPrivateAccesses() + .update(resourceGroupName, privateAccessName, updateProperties, Context.NONE); + return this; + } + + public PrivateAccess apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getPrivateAccesses() + .update(resourceGroupName, privateAccessName, updateProperties, context); + return this; + } + + PrivateAccessImpl(PrivateAccessInner innerObject, com.azure.resourcemanager.chaos.ChaosManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.privateAccessName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateAccesses"); + } + + public PrivateAccess refresh() { + this.innerObject = serviceManager.serviceClient() + .getPrivateAccesses() + .getByResourceGroupWithResponse(resourceGroupName, privateAccessName, Context.NONE) + .getValue(); + return this; + } + + public PrivateAccess refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getPrivateAccesses() + .getByResourceGroupWithResponse(resourceGroupName, privateAccessName, context) + .getValue(); + return this; + } + + public PrivateAccessImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public PrivateAccessImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public PrivateAccessImpl withProperties(PrivateAccessProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public PrivateAccessImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateProperties.withTags(tags); + return this; + } + } + + private boolean isInCreateMode() { + return this.innerModel() == null || this.innerModel().id() == null; + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/PrivateAccessesClientImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/PrivateAccessesClientImpl.java new file mode 100644 index 000000000000..87fa6ea890ad --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/PrivateAccessesClientImpl.java @@ -0,0 +1,1830 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.chaos.fluent.PrivateAccessesClient; +import com.azure.resourcemanager.chaos.fluent.models.PrivateAccessInner; +import com.azure.resourcemanager.chaos.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.chaos.fluent.models.PrivateLinkResourceListResultInner; +import com.azure.resourcemanager.chaos.implementation.models.PrivateAccessListResult; +import com.azure.resourcemanager.chaos.implementation.models.PrivateEndpointConnectionListResult; +import com.azure.resourcemanager.chaos.models.PrivateAccessPatch; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in PrivateAccessesClient. + */ +public final class PrivateAccessesClientImpl implements PrivateAccessesClient { + /** + * The proxy service used to perform REST calls. + */ + private final PrivateAccessesService service; + + /** + * The service client containing this operation class. + */ + private final ChaosManagementClientImpl client; + + /** + * Initializes an instance of PrivateAccessesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + PrivateAccessesClientImpl(ChaosManagementClientImpl client) { + this.service + = RestProxy.create(PrivateAccessesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ChaosManagementClientPrivateAccesses to be used by the proxy service + * to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "ChaosManagementClientPrivateAccesses") + public interface PrivateAccessesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/privateAccesses/{privateAccessName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateAccessName") String privateAccessName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/privateAccesses/{privateAccessName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateAccessName") String privateAccessName, @HeaderParam("Accept") String accept, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/privateAccesses/{privateAccessName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateAccessName") String privateAccessName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") PrivateAccessInner resource, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/privateAccesses/{privateAccessName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateAccessName") String privateAccessName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") PrivateAccessInner resource, + Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/privateAccesses/{privateAccessName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateAccessName") String privateAccessName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") PrivateAccessPatch properties, + Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/privateAccesses/{privateAccessName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateAccessName") String privateAccessName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") PrivateAccessPatch properties, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/privateAccesses/{privateAccessName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateAccessName") String privateAccessName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/privateAccesses/{privateAccessName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateAccessName") String privateAccessName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/privateAccesses") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("continuationToken") String continuationToken, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/privateAccesses") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("continuationToken") String continuationToken, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/privateAccesses") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("continuationToken") String continuationToken, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/privateAccesses") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("continuationToken") String continuationToken, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/privateAccesses/{privateAccessName}/privateLinkResources") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getPrivateLinkResources( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateAccessName") String privateAccessName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/privateAccesses/{privateAccessName}/privateLinkResources") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getPrivateLinkResourcesSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateAccessName") String privateAccessName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/privateAccesses/{privateAccessName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getAPrivateEndpointConnection( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateAccessName") String privateAccessName, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/privateAccesses/{privateAccessName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getAPrivateEndpointConnectionSync( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateAccessName") String privateAccessName, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/privateAccesses/{privateAccessName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> deleteAPrivateEndpointConnection(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateAccessName") String privateAccessName, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/privateAccesses/{privateAccessName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteAPrivateEndpointConnectionSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateAccessName") String privateAccessName, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/privateAccesses/{privateAccessName}/privateEndpointConnections") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listPrivateEndpointConnections( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateAccessName") String privateAccessName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/privateAccesses/{privateAccessName}/privateEndpointConnections") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listPrivateEndpointConnectionsSync( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateAccessName") String privateAccessName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listAllNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listAllNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listPrivateEndpointConnectionsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listPrivateEndpointConnectionsNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get a private access resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @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 private access resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String privateAccessName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateAccessName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a private access resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @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 private access resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String privateAccessName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, privateAccessName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a private access resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @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 private access resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String privateAccessName, Context context) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateAccessName, accept, context); + } + + /** + * Get a private access resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @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 private access resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateAccessInner getByResourceGroup(String resourceGroupName, String privateAccessName) { + return getByResourceGroupWithResponse(resourceGroupName, privateAccessName, Context.NONE).getValue(); + } + + /** + * Create or update a private access. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param resource private access resource to be created or updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return privateAccesses tracked resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String privateAccessName, PrivateAccessInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateAccessName, contentType, accept, resource, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update a private access. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param resource private access resource to be created or updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return privateAccesses tracked resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String privateAccessName, + PrivateAccessInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateAccessName, contentType, accept, resource, + Context.NONE); + } + + /** + * Create or update a private access. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param resource private access resource to be created or updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return privateAccesses tracked resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String privateAccessName, + PrivateAccessInner resource, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateAccessName, contentType, accept, resource, + context); + } + + /** + * Create or update a private access. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param resource private access resource to be created or updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of privateAccesses tracked resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, PrivateAccessInner> + beginCreateOrUpdateAsync(String resourceGroupName, String privateAccessName, PrivateAccessInner resource) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, privateAccessName, resource); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + PrivateAccessInner.class, PrivateAccessInner.class, this.client.getContext()); + } + + /** + * Create or update a private access. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param resource private access resource to be created or updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of privateAccesses tracked resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PrivateAccessInner> beginCreateOrUpdate(String resourceGroupName, + String privateAccessName, PrivateAccessInner resource) { + Response response = createOrUpdateWithResponse(resourceGroupName, privateAccessName, resource); + return this.client.getLroResult(response, PrivateAccessInner.class, + PrivateAccessInner.class, Context.NONE); + } + + /** + * Create or update a private access. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param resource private access resource to be created or updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of privateAccesses tracked resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PrivateAccessInner> beginCreateOrUpdate(String resourceGroupName, + String privateAccessName, PrivateAccessInner resource, Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, privateAccessName, resource, context); + return this.client.getLroResult(response, PrivateAccessInner.class, + PrivateAccessInner.class, context); + } + + /** + * Create or update a private access. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param resource private access resource to be created or updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return privateAccesses tracked resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String privateAccessName, + PrivateAccessInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, privateAccessName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update a private access. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param resource private access resource to be created or updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return privateAccesses tracked resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateAccessInner createOrUpdate(String resourceGroupName, String privateAccessName, + PrivateAccessInner resource) { + return beginCreateOrUpdate(resourceGroupName, privateAccessName, resource).getFinalResult(); + } + + /** + * Create or update a private access. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param resource private access resource to be created or updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return privateAccesses tracked resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateAccessInner createOrUpdate(String resourceGroupName, String privateAccessName, + PrivateAccessInner resource, Context context) { + return beginCreateOrUpdate(resourceGroupName, privateAccessName, resource, context).getFinalResult(); + } + + /** + * Patch a private access tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param properties private access resource's tags to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return privateAccesses tracked resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String privateAccessName, + PrivateAccessPatch properties) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateAccessName, contentType, accept, properties, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Patch a private access tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param properties private access resource's tags to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return privateAccesses tracked resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String privateAccessName, + PrivateAccessPatch properties) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateAccessName, contentType, accept, properties, + Context.NONE); + } + + /** + * Patch a private access tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param properties private access resource's tags to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return privateAccesses tracked resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String privateAccessName, + PrivateAccessPatch properties, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateAccessName, contentType, accept, properties, + context); + } + + /** + * Patch a private access tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param properties private access resource's tags to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of privateAccesses tracked resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, PrivateAccessInner> beginUpdateAsync(String resourceGroupName, + String privateAccessName, PrivateAccessPatch properties) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, privateAccessName, properties); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + PrivateAccessInner.class, PrivateAccessInner.class, this.client.getContext()); + } + + /** + * Patch a private access tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param properties private access resource's tags to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of privateAccesses tracked resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PrivateAccessInner> beginUpdate(String resourceGroupName, + String privateAccessName, PrivateAccessPatch properties) { + Response response = updateWithResponse(resourceGroupName, privateAccessName, properties); + return this.client.getLroResult(response, PrivateAccessInner.class, + PrivateAccessInner.class, Context.NONE); + } + + /** + * Patch a private access tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param properties private access resource's tags to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of privateAccesses tracked resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PrivateAccessInner> beginUpdate(String resourceGroupName, + String privateAccessName, PrivateAccessPatch properties, Context context) { + Response response = updateWithResponse(resourceGroupName, privateAccessName, properties, context); + return this.client.getLroResult(response, PrivateAccessInner.class, + PrivateAccessInner.class, context); + } + + /** + * Patch a private access tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param properties private access resource's tags to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return privateAccesses tracked resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String privateAccessName, + PrivateAccessPatch properties) { + return beginUpdateAsync(resourceGroupName, privateAccessName, properties).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Patch a private access tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param properties private access resource's tags to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return privateAccesses tracked resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateAccessInner update(String resourceGroupName, String privateAccessName, + PrivateAccessPatch properties) { + return beginUpdate(resourceGroupName, privateAccessName, properties).getFinalResult(); + } + + /** + * Patch a private access tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param properties private access resource's tags to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return privateAccesses tracked resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateAccessInner update(String resourceGroupName, String privateAccessName, PrivateAccessPatch properties, + Context context) { + return beginUpdate(resourceGroupName, privateAccessName, properties, context).getFinalResult(); + } + + /** + * Delete a private access. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String privateAccessName) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateAccessName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a private access. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String privateAccessName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateAccessName, Context.NONE); + } + + /** + * Delete a private access. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String privateAccessName, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateAccessName, context); + } + + /** + * Delete a private access. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String privateAccessName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, privateAccessName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a private access. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String privateAccessName) { + Response response = deleteWithResponse(resourceGroupName, privateAccessName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete a private access. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String privateAccessName, + Context context) { + Response response = deleteWithResponse(resourceGroupName, privateAccessName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete a private access. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String privateAccessName) { + return beginDeleteAsync(resourceGroupName, privateAccessName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a private access. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String privateAccessName) { + beginDelete(resourceGroupName, privateAccessName).getFinalResult(); + } + + /** + * Delete a private access. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String privateAccessName, Context context) { + beginDelete(resourceGroupName, privateAccessName, context).getFinalResult(); + } + + /** + * Get a list of private access resources in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 private access resources in a resource group along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + String continuationToken) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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 private access resources in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 private access resources in a resource group as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, String continuationToken) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, continuationToken), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of private access resources in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private access resources in a resource group as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + final String continuationToken = null; + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, continuationToken), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of private access resources in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 private access resources in a resource group along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, + String continuationToken) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, continuationToken, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get a list of private access resources in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 private access resources in a resource group along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, + String continuationToken, Context context) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, continuationToken, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get a list of private access resources in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private access resources in a resource group as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + final String continuationToken = null; + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, continuationToken), + nextLink -> listNextSinglePage(nextLink)); + } + + /** + * Get a list of private access resources in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 private access resources in a resource group as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, String continuationToken, + Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, continuationToken, context), + nextLink -> listNextSinglePage(nextLink, context)); + } + + /** + * Get a list of private access resources in a subscription. + * + * @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 private access resources in a subscription along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String continuationToken) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), 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 private access resources in a subscription. + * + * @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 private access resources in a subscription as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String continuationToken) { + return new PagedFlux<>(() -> listSinglePageAsync(continuationToken), + nextLink -> listAllNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of private access 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 private access resources in a subscription as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + final String continuationToken = null; + return new PagedFlux<>(() -> listSinglePageAsync(continuationToken), + nextLink -> listAllNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of private access resources in a subscription. + * + * @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 private access resources in a subscription along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String continuationToken) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), continuationToken, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get a list of private access resources in a subscription. + * + * @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 private access resources in a subscription along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String continuationToken, Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), continuationToken, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get a list of private access 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 private access resources in a subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + final String continuationToken = null; + return new PagedIterable<>(() -> listSinglePage(continuationToken), + nextLink -> listAllNextSinglePage(nextLink)); + } + + /** + * Get a list of private access resources in a subscription. + * + * @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 private access resources in a subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String continuationToken, Context context) { + return new PagedIterable<>(() -> listSinglePage(continuationToken, context), + nextLink -> listAllNextSinglePage(nextLink, context)); + } + + /** + * Gets the private link resources possible under private access resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @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 private link resources possible under private access resource along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getPrivateLinkResourcesWithResponseAsync(String resourceGroupName, String privateAccessName) { + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.getPrivateLinkResources(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateAccessName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the private link resources possible under private access resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @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 private link resources possible under private access resource on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getPrivateLinkResourcesAsync(String resourceGroupName, + String privateAccessName) { + return getPrivateLinkResourcesWithResponseAsync(resourceGroupName, privateAccessName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the private link resources possible under private access resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @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 private link resources possible under private access resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getPrivateLinkResourcesWithResponse(String resourceGroupName, + String privateAccessName, Context context) { + final String accept = "application/json"; + return service.getPrivateLinkResourcesSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateAccessName, accept, context); + } + + /** + * Gets the private link resources possible under private access resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @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 private link resources possible under private access resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateLinkResourceListResultInner getPrivateLinkResources(String resourceGroupName, + String privateAccessName) { + return getPrivateLinkResourcesWithResponse(resourceGroupName, privateAccessName, Context.NONE).getValue(); + } + + /** + * Gets information about a private endpoint connection under a private access resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @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 information about a private endpoint connection under a private access resource along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getAPrivateEndpointConnectionWithResponseAsync( + String resourceGroupName, String privateAccessName, String privateEndpointConnectionName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getAPrivateEndpointConnection(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateAccessName, + privateEndpointConnectionName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets information about a private endpoint connection under a private access resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @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 information about a private endpoint connection under a private access resource on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAPrivateEndpointConnectionAsync(String resourceGroupName, + String privateAccessName, String privateEndpointConnectionName) { + return getAPrivateEndpointConnectionWithResponseAsync(resourceGroupName, privateAccessName, + privateEndpointConnectionName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets information about a private endpoint connection under a private access resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @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 information about a private endpoint connection under a private access resource along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getAPrivateEndpointConnectionWithResponse(String resourceGroupName, + String privateAccessName, String privateEndpointConnectionName, Context context) { + final String accept = "application/json"; + return service.getAPrivateEndpointConnectionSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateAccessName, privateEndpointConnectionName, + accept, context); + } + + /** + * Gets information about a private endpoint connection under a private access resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @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 information about a private endpoint connection under a private access resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateEndpointConnectionInner getAPrivateEndpointConnection(String resourceGroupName, + String privateAccessName, String privateEndpointConnectionName) { + return getAPrivateEndpointConnectionWithResponse(resourceGroupName, privateAccessName, + privateEndpointConnectionName, Context.NONE).getValue(); + } + + /** + * Deletes a private endpoint connection under a private access resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteAPrivateEndpointConnectionWithResponseAsync(String resourceGroupName, + String privateAccessName, String privateEndpointConnectionName) { + return FluxUtil + .withContext(context -> service.deleteAPrivateEndpointConnection(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateAccessName, + privateEndpointConnectionName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a private endpoint connection under a private access resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteAPrivateEndpointConnectionWithResponse(String resourceGroupName, + String privateAccessName, String privateEndpointConnectionName) { + return service.deleteAPrivateEndpointConnectionSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateAccessName, privateEndpointConnectionName, + Context.NONE); + } + + /** + * Deletes a private endpoint connection under a private access resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteAPrivateEndpointConnectionWithResponse(String resourceGroupName, + String privateAccessName, String privateEndpointConnectionName, Context context) { + return service.deleteAPrivateEndpointConnectionSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateAccessName, privateEndpointConnectionName, + context); + } + + /** + * Deletes a private endpoint connection under a private access resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAPrivateEndpointConnectionAsync(String resourceGroupName, + String privateAccessName, String privateEndpointConnectionName) { + Mono>> mono = deleteAPrivateEndpointConnectionWithResponseAsync(resourceGroupName, + privateAccessName, privateEndpointConnectionName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes a private endpoint connection under a private access resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDeleteAPrivateEndpointConnection(String resourceGroupName, + String privateAccessName, String privateEndpointConnectionName) { + Response response = deleteAPrivateEndpointConnectionWithResponse(resourceGroupName, + privateAccessName, privateEndpointConnectionName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Deletes a private endpoint connection under a private access resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDeleteAPrivateEndpointConnection(String resourceGroupName, + String privateAccessName, String privateEndpointConnectionName, Context context) { + Response response = deleteAPrivateEndpointConnectionWithResponse(resourceGroupName, + privateAccessName, privateEndpointConnectionName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Deletes a private endpoint connection under a private access resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAPrivateEndpointConnectionAsync(String resourceGroupName, String privateAccessName, + String privateEndpointConnectionName) { + return beginDeleteAPrivateEndpointConnectionAsync(resourceGroupName, privateAccessName, + privateEndpointConnectionName).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a private endpoint connection under a private access resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteAPrivateEndpointConnection(String resourceGroupName, String privateAccessName, + String privateEndpointConnectionName) { + beginDeleteAPrivateEndpointConnection(resourceGroupName, privateAccessName, privateEndpointConnectionName) + .getFinalResult(); + } + + /** + * Deletes a private endpoint connection under a private access resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteAPrivateEndpointConnection(String resourceGroupName, String privateAccessName, + String privateEndpointConnectionName, Context context) { + beginDeleteAPrivateEndpointConnection(resourceGroupName, privateAccessName, privateEndpointConnectionName, + context).getFinalResult(); + } + + /** + * List information about private endpoint connections under a private access resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @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 private link resources along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listPrivateEndpointConnectionsSinglePageAsync(String resourceGroupName, String privateAccessName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listPrivateEndpointConnections(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateAccessName, + 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())); + } + + /** + * List information about private endpoint connections under a private access resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @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 private link resources as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listPrivateEndpointConnectionsAsync(String resourceGroupName, + String privateAccessName) { + return new PagedFlux<>( + () -> listPrivateEndpointConnectionsSinglePageAsync(resourceGroupName, privateAccessName), + nextLink -> listPrivateEndpointConnectionsNextSinglePageAsync(nextLink)); + } + + /** + * List information about private endpoint connections under a private access resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @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 private link resources along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse + listPrivateEndpointConnectionsSinglePage(String resourceGroupName, String privateAccessName) { + final String accept = "application/json"; + Response res + = service.listPrivateEndpointConnectionsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateAccessName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List information about private endpoint connections under a private access resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @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 private link resources along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse + listPrivateEndpointConnectionsSinglePage(String resourceGroupName, String privateAccessName, Context context) { + final String accept = "application/json"; + Response res + = service.listPrivateEndpointConnectionsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateAccessName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List information about private endpoint connections under a private access resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @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 private link resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listPrivateEndpointConnections(String resourceGroupName, + String privateAccessName) { + return new PagedIterable<>(() -> listPrivateEndpointConnectionsSinglePage(resourceGroupName, privateAccessName), + nextLink -> listPrivateEndpointConnectionsNextSinglePage(nextLink)); + } + + /** + * List information about private endpoint connections under a private access resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @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 private link resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listPrivateEndpointConnections(String resourceGroupName, + String privateAccessName, Context context) { + return new PagedIterable<>( + () -> listPrivateEndpointConnectionsSinglePage(resourceGroupName, privateAccessName, context), + nextLink -> listPrivateEndpointConnectionsNextSinglePage(nextLink, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private access resources in a resource group along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private access resources in a resource group along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return 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. + * @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 private access resources in a resource group along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return 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. + * @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 private access resources in a subscription along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAllNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listAllNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private access resources in a subscription along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listAllNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listAllNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return 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. + * @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 private access resources in a subscription along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listAllNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listAllNextSync(nextLink, this.client.getEndpoint(), accept, context); + return 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. + * @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 private link resources along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listPrivateEndpointConnectionsNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil.withContext( + context -> service.listPrivateEndpointConnectionsNext(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. + * @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 private link resources along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse + listPrivateEndpointConnectionsNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listPrivateEndpointConnectionsNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return 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. + * @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 private link resources along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listPrivateEndpointConnectionsNextSinglePage(String nextLink, + Context context) { + final String accept = "application/json"; + Response res + = service.listPrivateEndpointConnectionsNextSync(nextLink, this.client.getEndpoint(), accept, context); + return 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/PrivateAccessesImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/PrivateAccessesImpl.java new file mode 100644 index 000000000000..0b5091ac1cf6 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/PrivateAccessesImpl.java @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.chaos.fluent.PrivateAccessesClient; +import com.azure.resourcemanager.chaos.fluent.models.PrivateAccessInner; +import com.azure.resourcemanager.chaos.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.chaos.fluent.models.PrivateLinkResourceListResultInner; +import com.azure.resourcemanager.chaos.models.PrivateAccess; +import com.azure.resourcemanager.chaos.models.PrivateAccesses; +import com.azure.resourcemanager.chaos.models.PrivateEndpointConnection; +import com.azure.resourcemanager.chaos.models.PrivateLinkResourceListResult; + +public final class PrivateAccessesImpl implements PrivateAccesses { + private static final ClientLogger LOGGER = new ClientLogger(PrivateAccessesImpl.class); + + private final PrivateAccessesClient innerClient; + + private final com.azure.resourcemanager.chaos.ChaosManager serviceManager; + + public PrivateAccessesImpl(PrivateAccessesClient innerClient, + com.azure.resourcemanager.chaos.ChaosManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getByResourceGroupWithResponse(String resourceGroupName, String privateAccessName, + Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, privateAccessName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PrivateAccessImpl(inner.getValue(), this.manager())); + } + + public PrivateAccess getByResourceGroup(String resourceGroupName, String privateAccessName) { + PrivateAccessInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, privateAccessName); + if (inner != null) { + return new PrivateAccessImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String privateAccessName) { + this.serviceClient().delete(resourceGroupName, privateAccessName); + } + + public void delete(String resourceGroupName, String privateAccessName, Context context) { + this.serviceClient().delete(resourceGroupName, privateAccessName, context); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateAccessImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, String continuationToken, + Context context) { + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, continuationToken, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateAccessImpl(inner1, this.manager())); + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateAccessImpl(inner1, this.manager())); + } + + public PagedIterable list(String continuationToken, Context context) { + PagedIterable inner = this.serviceClient().list(continuationToken, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateAccessImpl(inner1, this.manager())); + } + + public Response getPrivateLinkResourcesWithResponse(String resourceGroupName, + String privateAccessName, Context context) { + Response inner + = this.serviceClient().getPrivateLinkResourcesWithResponse(resourceGroupName, privateAccessName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PrivateLinkResourceListResultImpl(inner.getValue(), this.manager())); + } + + public PrivateLinkResourceListResult getPrivateLinkResources(String resourceGroupName, String privateAccessName) { + PrivateLinkResourceListResultInner inner + = this.serviceClient().getPrivateLinkResources(resourceGroupName, privateAccessName); + if (inner != null) { + return new PrivateLinkResourceListResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getAPrivateEndpointConnectionWithResponse(String resourceGroupName, + String privateAccessName, String privateEndpointConnectionName, Context context) { + Response inner = this.serviceClient() + .getAPrivateEndpointConnectionWithResponse(resourceGroupName, privateAccessName, + privateEndpointConnectionName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PrivateEndpointConnectionImpl(inner.getValue(), this.manager())); + } + + public PrivateEndpointConnection getAPrivateEndpointConnection(String resourceGroupName, String privateAccessName, + String privateEndpointConnectionName) { + PrivateEndpointConnectionInner inner = this.serviceClient() + .getAPrivateEndpointConnection(resourceGroupName, privateAccessName, privateEndpointConnectionName); + if (inner != null) { + return new PrivateEndpointConnectionImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteAPrivateEndpointConnection(String resourceGroupName, String privateAccessName, + String privateEndpointConnectionName) { + this.serviceClient() + .deleteAPrivateEndpointConnection(resourceGroupName, privateAccessName, privateEndpointConnectionName); + } + + public void deleteAPrivateEndpointConnection(String resourceGroupName, String privateAccessName, + String privateEndpointConnectionName, Context context) { + this.serviceClient() + .deleteAPrivateEndpointConnection(resourceGroupName, privateAccessName, privateEndpointConnectionName, + context); + } + + public PagedIterable listPrivateEndpointConnections(String resourceGroupName, + String privateAccessName) { + PagedIterable inner + = this.serviceClient().listPrivateEndpointConnections(resourceGroupName, privateAccessName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())); + } + + public PagedIterable listPrivateEndpointConnections(String resourceGroupName, + String privateAccessName, Context context) { + PagedIterable inner + = this.serviceClient().listPrivateEndpointConnections(resourceGroupName, privateAccessName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())); + } + + public PrivateAccess getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String privateAccessName = ResourceManagerUtils.getValueFromIdByName(id, "privateAccesses"); + if (privateAccessName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateAccesses'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, privateAccessName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String privateAccessName = ResourceManagerUtils.getValueFromIdByName(id, "privateAccesses"); + if (privateAccessName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateAccesses'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, privateAccessName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String privateAccessName = ResourceManagerUtils.getValueFromIdByName(id, "privateAccesses"); + if (privateAccessName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateAccesses'.", id))); + } + this.delete(resourceGroupName, privateAccessName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String privateAccessName = ResourceManagerUtils.getValueFromIdByName(id, "privateAccesses"); + if (privateAccessName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateAccesses'.", id))); + } + this.delete(resourceGroupName, privateAccessName, context); + } + + private PrivateAccessesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.chaos.ChaosManager manager() { + return this.serviceManager; + } + + public PrivateAccessImpl define(String name) { + return new PrivateAccessImpl(name, this.manager()); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/PrivateEndpointConnectionImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/PrivateEndpointConnectionImpl.java new file mode 100644 index 000000000000..fb51a628d783 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/PrivateEndpointConnectionImpl.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.chaos.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.chaos.models.PrivateEndpointConnection; +import com.azure.resourcemanager.chaos.models.PrivateEndpointConnectionProperties; + +public final class PrivateEndpointConnectionImpl implements PrivateEndpointConnection { + private PrivateEndpointConnectionInner innerObject; + + private final com.azure.resourcemanager.chaos.ChaosManager serviceManager; + + PrivateEndpointConnectionImpl(PrivateEndpointConnectionInner innerObject, + com.azure.resourcemanager.chaos.ChaosManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public PrivateEndpointConnectionProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public PrivateEndpointConnectionInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.chaos.ChaosManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/PrivateLinkResourceListResultImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/PrivateLinkResourceListResultImpl.java new file mode 100644 index 000000000000..f50e9988a057 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/PrivateLinkResourceListResultImpl.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.implementation; + +import com.azure.resourcemanager.chaos.fluent.models.PrivateLinkResourceListResultInner; +import com.azure.resourcemanager.chaos.models.PrivateLinkResource; +import com.azure.resourcemanager.chaos.models.PrivateLinkResourceListResult; +import java.util.Collections; +import java.util.List; + +public final class PrivateLinkResourceListResultImpl implements PrivateLinkResourceListResult { + private PrivateLinkResourceListResultInner innerObject; + + private final com.azure.resourcemanager.chaos.ChaosManager serviceManager; + + PrivateLinkResourceListResultImpl(PrivateLinkResourceListResultInner innerObject, + com.azure.resourcemanager.chaos.ChaosManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public List value() { + List inner = this.innerModel().value(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String nextLink() { + return this.innerModel().nextLink(); + } + + public PrivateLinkResourceListResultInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.chaos.ChaosManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioConfigurationImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioConfigurationImpl.java new file mode 100644 index 000000000000..0df3f144fab4 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioConfigurationImpl.java @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.chaos.fluent.models.ScenarioConfigurationInner; +import com.azure.resourcemanager.chaos.models.FixResourcePermissionsRequest; +import com.azure.resourcemanager.chaos.models.PermissionsFix; +import com.azure.resourcemanager.chaos.models.ScenarioConfiguration; +import com.azure.resourcemanager.chaos.models.ScenarioConfigurationProperties; +import com.azure.resourcemanager.chaos.models.ScenarioConfigurationsExecuteResponse; +import com.azure.resourcemanager.chaos.models.Validation; + +public final class ScenarioConfigurationImpl + implements ScenarioConfiguration, ScenarioConfiguration.Definition, ScenarioConfiguration.Update { + private ScenarioConfigurationInner innerObject; + + private final com.azure.resourcemanager.chaos.ChaosManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public ScenarioConfigurationProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public ScenarioConfigurationInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.chaos.ChaosManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String workspaceName; + + private String scenarioName; + + private String scenarioConfigurationName; + + public ScenarioConfigurationImpl withExistingScenario(String resourceGroupName, String workspaceName, + String scenarioName) { + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + this.scenarioName = scenarioName; + return this; + } + + public ScenarioConfiguration create() { + this.innerObject = serviceManager.serviceClient() + .getScenarioConfigurations() + .createOrUpdate(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, + this.innerModel(), Context.NONE); + return this; + } + + public ScenarioConfiguration create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getScenarioConfigurations() + .createOrUpdate(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, + this.innerModel(), context); + return this; + } + + ScenarioConfigurationImpl(String name, com.azure.resourcemanager.chaos.ChaosManager serviceManager) { + this.innerObject = new ScenarioConfigurationInner(); + this.serviceManager = serviceManager; + this.scenarioConfigurationName = name; + } + + public ScenarioConfigurationImpl update() { + return this; + } + + public ScenarioConfiguration apply() { + this.innerObject = serviceManager.serviceClient() + .getScenarioConfigurations() + .createOrUpdate(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, + this.innerModel(), Context.NONE); + return this; + } + + public ScenarioConfiguration apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getScenarioConfigurations() + .createOrUpdate(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, + this.innerModel(), context); + return this; + } + + ScenarioConfigurationImpl(ScenarioConfigurationInner innerObject, + com.azure.resourcemanager.chaos.ChaosManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.scenarioName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "scenarios"); + this.scenarioConfigurationName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "configurations"); + } + + public ScenarioConfiguration refresh() { + this.innerObject = serviceManager.serviceClient() + .getScenarioConfigurations() + .getWithResponse(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, Context.NONE) + .getValue(); + return this; + } + + public ScenarioConfiguration refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getScenarioConfigurations() + .getWithResponse(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, context) + .getValue(); + return this; + } + + public ScenarioConfigurationsExecuteResponse executeWithResponse(Context context) { + return serviceManager.scenarioConfigurations() + .executeWithResponse(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, context); + } + + public void execute() { + serviceManager.scenarioConfigurations() + .execute(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName); + } + + public Validation validate() { + return serviceManager.scenarioConfigurations() + .validate(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName); + } + + public Validation validate(Context context) { + return serviceManager.scenarioConfigurations() + .validate(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, context); + } + + public PermissionsFix fixResourcePermissions() { + return serviceManager.scenarioConfigurations() + .fixResourcePermissions(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName); + } + + public PermissionsFix fixResourcePermissions(FixResourcePermissionsRequest body, Context context) { + return serviceManager.scenarioConfigurations() + .fixResourcePermissions(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, body, + context); + } + + public ScenarioConfigurationImpl withProperties(ScenarioConfigurationProperties properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioConfigurationsClientImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioConfigurationsClientImpl.java new file mode 100644 index 000000000000..5b89df9a5c12 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioConfigurationsClientImpl.java @@ -0,0 +1,1410 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.chaos.fluent.ScenarioConfigurationsClient; +import com.azure.resourcemanager.chaos.fluent.models.ScenarioConfigurationInner; +import com.azure.resourcemanager.chaos.implementation.models.ScenarioConfigurationListResult; +import com.azure.resourcemanager.chaos.models.FixResourcePermissionsRequest; +import com.azure.resourcemanager.chaos.models.PermissionsFix; +import com.azure.resourcemanager.chaos.models.ScenarioConfigurationsExecuteResponse; +import com.azure.resourcemanager.chaos.models.Validation; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ScenarioConfigurationsClient. + */ +public final class ScenarioConfigurationsClientImpl implements ScenarioConfigurationsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ScenarioConfigurationsService service; + + /** + * The service client containing this operation class. + */ + private final ChaosManagementClientImpl client; + + /** + * Initializes an instance of ScenarioConfigurationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ScenarioConfigurationsClientImpl(ChaosManagementClientImpl client) { + this.service = RestProxy.create(ScenarioConfigurationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ChaosManagementClientScenarioConfigurations to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "ChaosManagementClientScenarioConfigurations") + public interface ScenarioConfigurationsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}/configurations/{scenarioConfigurationName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("scenarioName") String scenarioName, + @PathParam("scenarioConfigurationName") String scenarioConfigurationName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}/configurations/{scenarioConfigurationName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("scenarioName") String scenarioName, + @PathParam("scenarioConfigurationName") String scenarioConfigurationName, + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}/configurations/{scenarioConfigurationName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("scenarioName") String scenarioName, + @PathParam("scenarioConfigurationName") String scenarioConfigurationName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ScenarioConfigurationInner resource, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}/configurations/{scenarioConfigurationName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("scenarioName") String scenarioName, + @PathParam("scenarioConfigurationName") String scenarioConfigurationName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ScenarioConfigurationInner resource, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}/configurations/{scenarioConfigurationName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("scenarioName") String scenarioName, + @PathParam("scenarioConfigurationName") String scenarioConfigurationName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}/configurations/{scenarioConfigurationName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("scenarioName") String scenarioName, + @PathParam("scenarioConfigurationName") String scenarioConfigurationName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}/configurations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listAll(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("scenarioName") String scenarioName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}/configurations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listAllSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("scenarioName") String scenarioName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}/configurations/{scenarioConfigurationName}/execute") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono execute(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("scenarioName") String scenarioName, + @PathParam("scenarioConfigurationName") String scenarioConfigurationName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}/configurations/{scenarioConfigurationName}/execute") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + ScenarioConfigurationsExecuteResponse executeSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("scenarioName") String scenarioName, + @PathParam("scenarioConfigurationName") String scenarioConfigurationName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}/configurations/{scenarioConfigurationName}/validate") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> validate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("scenarioName") String scenarioName, + @PathParam("scenarioConfigurationName") String scenarioConfigurationName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}/configurations/{scenarioConfigurationName}/validate") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response validateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("scenarioName") String scenarioName, + @PathParam("scenarioConfigurationName") String scenarioConfigurationName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}/configurations/{scenarioConfigurationName}/fixResourcePermissions") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> fixResourcePermissions(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("scenarioName") String scenarioName, + @PathParam("scenarioConfigurationName") String scenarioConfigurationName, + @BodyParam("application/json") FixResourcePermissionsRequest body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}/configurations/{scenarioConfigurationName}/fixResourcePermissions") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response fixResourcePermissionsSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("scenarioName") String scenarioName, + @PathParam("scenarioConfigurationName") String scenarioConfigurationName, + @BodyParam("application/json") FixResourcePermissionsRequest body, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listAllNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listAllNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get a scenario definition. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @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 scenario definition along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String workspaceName, String scenarioName, String scenarioConfigurationName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, scenarioName, + scenarioConfigurationName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a scenario definition. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @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 scenario definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String workspaceName, + String scenarioName, String scenarioConfigurationName) { + return getWithResponseAsync(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a scenario definition. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @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 scenario definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String workspaceName, + String scenarioName, String scenarioConfigurationName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, accept, context); + } + + /** + * Get a scenario definition. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @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 scenario definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ScenarioConfigurationInner get(String resourceGroupName, String workspaceName, String scenarioName, + String scenarioConfigurationName) { + return getWithResponse(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, Context.NONE) + .getValue(); + } + + /** + * Create or update a scenario definition. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return model that represents the scenario along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String scenarioName, String scenarioConfigurationName, + ScenarioConfigurationInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, scenarioName, + scenarioConfigurationName, contentType, accept, resource, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update a scenario definition. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return model that represents the scenario along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String scenarioName, String scenarioConfigurationName, ScenarioConfigurationInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, + contentType, accept, resource, Context.NONE); + } + + /** + * Create or update a scenario definition. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return model that represents the scenario along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String scenarioName, String scenarioConfigurationName, ScenarioConfigurationInner resource, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, + contentType, accept, resource, context); + } + + /** + * Create or update a scenario definition. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of model that represents the scenario. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ScenarioConfigurationInner> beginCreateOrUpdateAsync( + String resourceGroupName, String workspaceName, String scenarioName, String scenarioConfigurationName, + ScenarioConfigurationInner resource) { + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, + scenarioName, scenarioConfigurationName, resource); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ScenarioConfigurationInner.class, ScenarioConfigurationInner.class, + this.client.getContext()); + } + + /** + * Create or update a scenario definition. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of model that represents the scenario. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ScenarioConfigurationInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String scenarioName, String scenarioConfigurationName, + ScenarioConfigurationInner resource) { + Response response = createOrUpdateWithResponse(resourceGroupName, workspaceName, scenarioName, + scenarioConfigurationName, resource); + return this.client.getLroResult(response, + ScenarioConfigurationInner.class, ScenarioConfigurationInner.class, Context.NONE); + } + + /** + * Create or update a scenario definition. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of model that represents the scenario. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ScenarioConfigurationInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String scenarioName, String scenarioConfigurationName, + ScenarioConfigurationInner resource, Context context) { + Response response = createOrUpdateWithResponse(resourceGroupName, workspaceName, scenarioName, + scenarioConfigurationName, resource, context); + return this.client.getLroResult(response, + ScenarioConfigurationInner.class, ScenarioConfigurationInner.class, context); + } + + /** + * Create or update a scenario definition. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return model that represents the scenario on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, + String scenarioName, String scenarioConfigurationName, ScenarioConfigurationInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, + resource).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update a scenario definition. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return model that represents the scenario. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ScenarioConfigurationInner createOrUpdate(String resourceGroupName, String workspaceName, + String scenarioName, String scenarioConfigurationName, ScenarioConfigurationInner resource) { + return beginCreateOrUpdate(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, resource) + .getFinalResult(); + } + + /** + * Create or update a scenario definition. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return model that represents the scenario. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ScenarioConfigurationInner createOrUpdate(String resourceGroupName, String workspaceName, + String scenarioName, String scenarioConfigurationName, ScenarioConfigurationInner resource, Context context) { + return beginCreateOrUpdate(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, resource, + context).getFinalResult(); + } + + /** + * Delete a scenario definition. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, + String scenarioName, String scenarioConfigurationName) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, scenarioName, + scenarioConfigurationName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a scenario definition. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String workspaceName, String scenarioName, + String scenarioConfigurationName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, + Context.NONE); + } + + /** + * Delete a scenario definition. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String workspaceName, String scenarioName, + String scenarioConfigurationName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, + context); + } + + /** + * Delete a scenario definition. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, + String scenarioName, String scenarioConfigurationName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a scenario definition. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + String scenarioName, String scenarioConfigurationName) { + Response response + = deleteWithResponse(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete a scenario definition. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + String scenarioName, String scenarioConfigurationName, Context context) { + Response response + = deleteWithResponse(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete a scenario definition. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String workspaceName, String scenarioName, + String scenarioConfigurationName) { + return beginDeleteAsync(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a scenario definition. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String workspaceName, String scenarioName, + String scenarioConfigurationName) { + beginDelete(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName).getFinalResult(); + } + + /** + * Delete a scenario definition. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String workspaceName, String scenarioName, + String scenarioConfigurationName, Context context) { + beginDelete(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, context) + .getFinalResult(); + } + + /** + * Get a list of scenario definitions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @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 scenario definitions along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAllSinglePageAsync(String resourceGroupName, + String workspaceName, String scenarioName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listAll(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, scenarioName, 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 scenario definitions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @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 scenario definitions as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAllAsync(String resourceGroupName, String workspaceName, + String scenarioName) { + return new PagedFlux<>(() -> listAllSinglePageAsync(resourceGroupName, workspaceName, scenarioName), + nextLink -> listAllNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of scenario definitions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @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 scenario definitions along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listAllSinglePage(String resourceGroupName, String workspaceName, + String scenarioName) { + final String accept = "application/json"; + Response res + = service.listAllSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, scenarioName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get a list of scenario definitions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @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 scenario definitions along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listAllSinglePage(String resourceGroupName, String workspaceName, + String scenarioName, Context context) { + final String accept = "application/json"; + Response res + = service.listAllSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, scenarioName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get a list of scenario definitions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @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 scenario definitions as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAll(String resourceGroupName, String workspaceName, + String scenarioName) { + return new PagedIterable<>(() -> listAllSinglePage(resourceGroupName, workspaceName, scenarioName), + nextLink -> listAllNextSinglePage(nextLink)); + } + + /** + * Get a list of scenario definitions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @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 scenario definitions as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAll(String resourceGroupName, String workspaceName, + String scenarioName, Context context) { + return new PagedIterable<>(() -> listAllSinglePage(resourceGroupName, workspaceName, scenarioName, context), + nextLink -> listAllNextSinglePage(nextLink, context)); + } + + /** + * Execute the scenario execution with the given scenario configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono executeWithResponseAsync(String resourceGroupName, + String workspaceName, String scenarioName, String scenarioConfigurationName) { + return FluxUtil + .withContext(context -> service.execute(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, scenarioName, + scenarioConfigurationName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Execute the scenario execution with the given scenario configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono executeAsync(String resourceGroupName, String workspaceName, String scenarioName, + String scenarioConfigurationName) { + return executeWithResponseAsync(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName) + .flatMap(ignored -> Mono.empty()); + } + + /** + * Execute the scenario execution with the given scenario configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ScenarioConfigurationsExecuteResponse executeWithResponse(String resourceGroupName, String workspaceName, + String scenarioName, String scenarioConfigurationName, Context context) { + return service.executeSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, + context); + } + + /** + * Execute the scenario execution with the given scenario configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void execute(String resourceGroupName, String workspaceName, String scenarioName, + String scenarioConfigurationName) { + executeWithResponse(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, Context.NONE); + } + + /** + * Validate the given scenario configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> validateWithResponseAsync(String resourceGroupName, String workspaceName, + String scenarioName, String scenarioConfigurationName) { + return FluxUtil + .withContext(context -> service.validate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, scenarioName, + scenarioConfigurationName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Validate the given scenario configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response validateWithResponse(String resourceGroupName, String workspaceName, + String scenarioName, String scenarioConfigurationName) { + return service.validateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, + Context.NONE); + } + + /** + * Validate the given scenario configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response validateWithResponse(String resourceGroupName, String workspaceName, + String scenarioName, String scenarioConfigurationName, Context context) { + return service.validateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, + context); + } + + /** + * Validate the given scenario configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Validation> beginValidateAsync(String resourceGroupName, + String workspaceName, String scenarioName, String scenarioConfigurationName) { + Mono>> mono + = validateWithResponseAsync(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Validation.class, + Validation.class, this.client.getContext()); + } + + /** + * Validate the given scenario configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Validation> beginValidate(String resourceGroupName, String workspaceName, + String scenarioName, String scenarioConfigurationName) { + Response response + = validateWithResponse(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName); + return this.client.getLroResult(response, Validation.class, Validation.class, + Context.NONE); + } + + /** + * Validate the given scenario configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Validation> beginValidate(String resourceGroupName, String workspaceName, + String scenarioName, String scenarioConfigurationName, Context context) { + Response response + = validateWithResponse(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, context); + return this.client.getLroResult(response, Validation.class, Validation.class, context); + } + + /** + * Validate the given scenario configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono validateAsync(String resourceGroupName, String workspaceName, String scenarioName, + String scenarioConfigurationName) { + return beginValidateAsync(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Validate the given scenario configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Validation validate(String resourceGroupName, String workspaceName, String scenarioName, + String scenarioConfigurationName) { + return beginValidate(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName) + .getFinalResult(); + } + + /** + * Validate the given scenario configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Validation validate(String resourceGroupName, String workspaceName, String scenarioName, + String scenarioConfigurationName, Context context) { + return beginValidate(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, context) + .getFinalResult(); + } + + /** + * Fixes resource permissions for the given scenario configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @param body The body 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 the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> fixResourcePermissionsWithResponseAsync(String resourceGroupName, + String workspaceName, String scenarioName, String scenarioConfigurationName, + FixResourcePermissionsRequest body) { + return FluxUtil + .withContext(context -> service.fixResourcePermissions(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, + scenarioName, scenarioConfigurationName, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Fixes resource permissions for the given scenario configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @param body The body 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 the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response fixResourcePermissionsWithResponse(String resourceGroupName, String workspaceName, + String scenarioName, String scenarioConfigurationName, FixResourcePermissionsRequest body) { + return service.fixResourcePermissionsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, + body, Context.NONE); + } + + /** + * Fixes resource permissions for the given scenario configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @param body The body 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 the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response fixResourcePermissionsWithResponse(String resourceGroupName, String workspaceName, + String scenarioName, String scenarioConfigurationName, FixResourcePermissionsRequest body, Context context) { + return service.fixResourcePermissionsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, + body, context); + } + + /** + * Fixes resource permissions for the given scenario configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @param body The body 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 the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, PermissionsFix> beginFixResourcePermissionsAsync( + String resourceGroupName, String workspaceName, String scenarioName, String scenarioConfigurationName, + FixResourcePermissionsRequest body) { + Mono>> mono = fixResourcePermissionsWithResponseAsync(resourceGroupName, + workspaceName, scenarioName, scenarioConfigurationName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + PermissionsFix.class, PermissionsFix.class, this.client.getContext()); + } + + /** + * Fixes resource permissions for the given scenario configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, PermissionsFix> beginFixResourcePermissionsAsync( + String resourceGroupName, String workspaceName, String scenarioName, String scenarioConfigurationName) { + final FixResourcePermissionsRequest body = null; + Mono>> mono = fixResourcePermissionsWithResponseAsync(resourceGroupName, + workspaceName, scenarioName, scenarioConfigurationName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + PermissionsFix.class, PermissionsFix.class, this.client.getContext()); + } + + /** + * Fixes resource permissions for the given scenario configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @param body The body 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 the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PermissionsFix> beginFixResourcePermissions(String resourceGroupName, + String workspaceName, String scenarioName, String scenarioConfigurationName, + FixResourcePermissionsRequest body) { + Response response = fixResourcePermissionsWithResponse(resourceGroupName, workspaceName, + scenarioName, scenarioConfigurationName, body); + return this.client.getLroResult(response, PermissionsFix.class, + PermissionsFix.class, Context.NONE); + } + + /** + * Fixes resource permissions for the given scenario configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PermissionsFix> beginFixResourcePermissions(String resourceGroupName, + String workspaceName, String scenarioName, String scenarioConfigurationName) { + final FixResourcePermissionsRequest body = null; + Response response = fixResourcePermissionsWithResponse(resourceGroupName, workspaceName, + scenarioName, scenarioConfigurationName, body); + return this.client.getLroResult(response, PermissionsFix.class, + PermissionsFix.class, Context.NONE); + } + + /** + * Fixes resource permissions for the given scenario configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @param body The body 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 the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PermissionsFix> beginFixResourcePermissions(String resourceGroupName, + String workspaceName, String scenarioName, String scenarioConfigurationName, FixResourcePermissionsRequest body, + Context context) { + Response response = fixResourcePermissionsWithResponse(resourceGroupName, workspaceName, + scenarioName, scenarioConfigurationName, body, context); + return this.client.getLroResult(response, PermissionsFix.class, + PermissionsFix.class, context); + } + + /** + * Fixes resource permissions for the given scenario configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @param body The body 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 the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono fixResourcePermissionsAsync(String resourceGroupName, String workspaceName, + String scenarioName, String scenarioConfigurationName, FixResourcePermissionsRequest body) { + return beginFixResourcePermissionsAsync(resourceGroupName, workspaceName, scenarioName, + scenarioConfigurationName, body).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Fixes resource permissions for the given scenario configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono fixResourcePermissionsAsync(String resourceGroupName, String workspaceName, + String scenarioName, String scenarioConfigurationName) { + final FixResourcePermissionsRequest body = null; + return beginFixResourcePermissionsAsync(resourceGroupName, workspaceName, scenarioName, + scenarioConfigurationName, body).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Fixes resource permissions for the given scenario configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PermissionsFix fixResourcePermissions(String resourceGroupName, String workspaceName, String scenarioName, + String scenarioConfigurationName) { + final FixResourcePermissionsRequest body = null; + return beginFixResourcePermissions(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, + body).getFinalResult(); + } + + /** + * Fixes resource permissions for the given scenario configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @param body The body 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 the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PermissionsFix fixResourcePermissions(String resourceGroupName, String workspaceName, String scenarioName, + String scenarioConfigurationName, FixResourcePermissionsRequest body, Context context) { + return beginFixResourcePermissions(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, + body, context).getFinalResult(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of scenario definitions along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAllNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listAllNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of scenario definitions along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listAllNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listAllNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return 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. + * @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 scenario definitions along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listAllNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listAllNextSync(nextLink, this.client.getEndpoint(), accept, context); + return 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/ScenarioConfigurationsImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioConfigurationsImpl.java new file mode 100644 index 000000000000..f8849950fd0f --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioConfigurationsImpl.java @@ -0,0 +1,221 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.chaos.fluent.ScenarioConfigurationsClient; +import com.azure.resourcemanager.chaos.fluent.models.ScenarioConfigurationInner; +import com.azure.resourcemanager.chaos.models.FixResourcePermissionsRequest; +import com.azure.resourcemanager.chaos.models.PermissionsFix; +import com.azure.resourcemanager.chaos.models.ScenarioConfiguration; +import com.azure.resourcemanager.chaos.models.ScenarioConfigurations; +import com.azure.resourcemanager.chaos.models.ScenarioConfigurationsExecuteResponse; +import com.azure.resourcemanager.chaos.models.Validation; + +public final class ScenarioConfigurationsImpl implements ScenarioConfigurations { + private static final ClientLogger LOGGER = new ClientLogger(ScenarioConfigurationsImpl.class); + + private final ScenarioConfigurationsClient innerClient; + + private final com.azure.resourcemanager.chaos.ChaosManager serviceManager; + + public ScenarioConfigurationsImpl(ScenarioConfigurationsClient innerClient, + com.azure.resourcemanager.chaos.ChaosManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String workspaceName, + String scenarioName, String scenarioConfigurationName, Context context) { + Response inner = this.serviceClient() + .getWithResponse(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ScenarioConfigurationImpl(inner.getValue(), this.manager())); + } + + public ScenarioConfiguration get(String resourceGroupName, String workspaceName, String scenarioName, + String scenarioConfigurationName) { + ScenarioConfigurationInner inner + = this.serviceClient().get(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName); + if (inner != null) { + return new ScenarioConfigurationImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String workspaceName, String scenarioName, + String scenarioConfigurationName) { + this.serviceClient().delete(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName); + } + + public void delete(String resourceGroupName, String workspaceName, String scenarioName, + String scenarioConfigurationName, Context context) { + this.serviceClient().delete(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, context); + } + + public PagedIterable listAll(String resourceGroupName, String workspaceName, + String scenarioName) { + PagedIterable inner + = this.serviceClient().listAll(resourceGroupName, workspaceName, scenarioName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ScenarioConfigurationImpl(inner1, this.manager())); + } + + public PagedIterable listAll(String resourceGroupName, String workspaceName, + String scenarioName, Context context) { + PagedIterable inner + = this.serviceClient().listAll(resourceGroupName, workspaceName, scenarioName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ScenarioConfigurationImpl(inner1, this.manager())); + } + + public ScenarioConfigurationsExecuteResponse executeWithResponse(String resourceGroupName, String workspaceName, + String scenarioName, String scenarioConfigurationName, Context context) { + return this.serviceClient() + .executeWithResponse(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, context); + } + + public void execute(String resourceGroupName, String workspaceName, String scenarioName, + String scenarioConfigurationName) { + this.serviceClient().execute(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName); + } + + public Validation validate(String resourceGroupName, String workspaceName, String scenarioName, + String scenarioConfigurationName) { + return this.serviceClient().validate(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName); + } + + public Validation validate(String resourceGroupName, String workspaceName, String scenarioName, + String scenarioConfigurationName, Context context) { + return this.serviceClient() + .validate(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, context); + } + + public PermissionsFix fixResourcePermissions(String resourceGroupName, String workspaceName, String scenarioName, + String scenarioConfigurationName) { + return this.serviceClient() + .fixResourcePermissions(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName); + } + + public PermissionsFix fixResourcePermissions(String resourceGroupName, String workspaceName, String scenarioName, + String scenarioConfigurationName, FixResourcePermissionsRequest body, Context context) { + return this.serviceClient() + .fixResourcePermissions(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, body, + context); + } + + public ScenarioConfiguration getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String scenarioName = ResourceManagerUtils.getValueFromIdByName(id, "scenarios"); + if (scenarioName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'scenarios'.", id))); + } + String scenarioConfigurationName = ResourceManagerUtils.getValueFromIdByName(id, "configurations"); + if (scenarioConfigurationName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'configurations'.", id))); + } + return this + .getWithResponse(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, Context.NONE) + .getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String scenarioName = ResourceManagerUtils.getValueFromIdByName(id, "scenarios"); + if (scenarioName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'scenarios'.", id))); + } + String scenarioConfigurationName = ResourceManagerUtils.getValueFromIdByName(id, "configurations"); + if (scenarioConfigurationName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'configurations'.", id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String scenarioName = ResourceManagerUtils.getValueFromIdByName(id, "scenarios"); + if (scenarioName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'scenarios'.", id))); + } + String scenarioConfigurationName = ResourceManagerUtils.getValueFromIdByName(id, "configurations"); + if (scenarioConfigurationName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'configurations'.", id))); + } + this.delete(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String scenarioName = ResourceManagerUtils.getValueFromIdByName(id, "scenarios"); + if (scenarioName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'scenarios'.", id))); + } + String scenarioConfigurationName = ResourceManagerUtils.getValueFromIdByName(id, "configurations"); + if (scenarioConfigurationName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'configurations'.", id))); + } + this.delete(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, context); + } + + private ScenarioConfigurationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.chaos.ChaosManager manager() { + return this.serviceManager; + } + + public ScenarioConfigurationImpl define(String name) { + return new ScenarioConfigurationImpl(name, this.manager()); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioImpl.java new file mode 100644 index 000000000000..e9ccf1ac7a99 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioImpl.java @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.chaos.fluent.models.ScenarioInner; +import com.azure.resourcemanager.chaos.models.Scenario; +import com.azure.resourcemanager.chaos.models.ScenarioProperties; + +public final class ScenarioImpl implements Scenario, Scenario.Definition, Scenario.Update { + private ScenarioInner innerObject; + + private final com.azure.resourcemanager.chaos.ChaosManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public ScenarioProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public ScenarioInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.chaos.ChaosManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String workspaceName; + + private String scenarioName; + + public ScenarioImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + return this; + } + + public Scenario create() { + this.innerObject = serviceManager.serviceClient() + .getScenarios() + .createOrUpdateWithResponse(resourceGroupName, workspaceName, scenarioName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public Scenario create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getScenarios() + .createOrUpdateWithResponse(resourceGroupName, workspaceName, scenarioName, this.innerModel(), context) + .getValue(); + return this; + } + + ScenarioImpl(String name, com.azure.resourcemanager.chaos.ChaosManager serviceManager) { + this.innerObject = new ScenarioInner(); + this.serviceManager = serviceManager; + this.scenarioName = name; + } + + public ScenarioImpl update() { + return this; + } + + public Scenario apply() { + this.innerObject = serviceManager.serviceClient() + .getScenarios() + .createOrUpdateWithResponse(resourceGroupName, workspaceName, scenarioName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public Scenario apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getScenarios() + .createOrUpdateWithResponse(resourceGroupName, workspaceName, scenarioName, this.innerModel(), context) + .getValue(); + return this; + } + + ScenarioImpl(ScenarioInner innerObject, com.azure.resourcemanager.chaos.ChaosManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.scenarioName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "scenarios"); + } + + public Scenario refresh() { + this.innerObject = serviceManager.serviceClient() + .getScenarios() + .getWithResponse(resourceGroupName, workspaceName, scenarioName, Context.NONE) + .getValue(); + return this; + } + + public Scenario refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getScenarios() + .getWithResponse(resourceGroupName, workspaceName, scenarioName, context) + .getValue(); + return this; + } + + public ScenarioImpl withProperties(ScenarioProperties properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioRunImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioRunImpl.java new file mode 100644 index 000000000000..7d25b39c91a4 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioRunImpl.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.chaos.fluent.models.ScenarioRunInner; +import com.azure.resourcemanager.chaos.models.ScenarioRun; +import com.azure.resourcemanager.chaos.models.ScenarioRunProperties; + +public final class ScenarioRunImpl implements ScenarioRun { + private ScenarioRunInner innerObject; + + private final com.azure.resourcemanager.chaos.ChaosManager serviceManager; + + ScenarioRunImpl(ScenarioRunInner innerObject, com.azure.resourcemanager.chaos.ChaosManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public ScenarioRunProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ScenarioRunInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.chaos.ChaosManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioRunsClientImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioRunsClientImpl.java new file mode 100644 index 000000000000..ed305f9bc5cf --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioRunsClientImpl.java @@ -0,0 +1,471 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.chaos.fluent.ScenarioRunsClient; +import com.azure.resourcemanager.chaos.fluent.models.ScenarioRunInner; +import com.azure.resourcemanager.chaos.implementation.models.ScenarioRunListResult; +import com.azure.resourcemanager.chaos.models.ScenarioRunsCancelResponse; +import com.azure.resourcemanager.chaos.models.ScenarioRunsGetResponse; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ScenarioRunsClient. + */ +public final class ScenarioRunsClientImpl implements ScenarioRunsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ScenarioRunsService service; + + /** + * The service client containing this operation class. + */ + private final ChaosManagementClientImpl client; + + /** + * Initializes an instance of ScenarioRunsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ScenarioRunsClientImpl(ChaosManagementClientImpl client) { + this.service + = RestProxy.create(ScenarioRunsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ChaosManagementClientScenarioRuns to be used by the proxy service to + * perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "ChaosManagementClientScenarioRuns") + public interface ScenarioRunsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}/runs/{runId}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("scenarioName") String scenarioName, @PathParam("runId") String runId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}/runs/{runId}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + ScenarioRunsGetResponse getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("scenarioName") String scenarioName, @PathParam("runId") String runId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}/runs") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listAll(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("scenarioName") String scenarioName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}/runs") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listAllSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("scenarioName") String scenarioName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}/runs/{runId}/cancel") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono cancel(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("scenarioName") String scenarioName, @PathParam("runId") String runId, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}/runs/{runId}/cancel") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + ScenarioRunsCancelResponse cancelSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("scenarioName") String scenarioName, @PathParam("runId") String runId, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listAllNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listAllNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get a scenario run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param runId The name of the ScenarioRun. + * @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 scenario run on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getWithResponseAsync(String resourceGroupName, String workspaceName, + String scenarioName, String runId) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, scenarioName, runId, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a scenario run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param runId The name of the ScenarioRun. + * @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 scenario run on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String workspaceName, String scenarioName, + String runId) { + return getWithResponseAsync(resourceGroupName, workspaceName, scenarioName, runId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a scenario run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param runId The name of the ScenarioRun. + * @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 scenario run. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ScenarioRunsGetResponse getWithResponse(String resourceGroupName, String workspaceName, String scenarioName, + String runId, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, scenarioName, runId, accept, context); + } + + /** + * Get a scenario run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param runId The name of the ScenarioRun. + * @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 scenario run. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ScenarioRunInner get(String resourceGroupName, String workspaceName, String scenarioName, String runId) { + return getWithResponse(resourceGroupName, workspaceName, scenarioName, runId, Context.NONE).getValue(); + } + + /** + * Get a list of scenario runs. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @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 scenario runs along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAllSinglePageAsync(String resourceGroupName, String workspaceName, + String scenarioName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listAll(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, scenarioName, 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 scenario runs. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @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 scenario runs as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAllAsync(String resourceGroupName, String workspaceName, + String scenarioName) { + return new PagedFlux<>(() -> listAllSinglePageAsync(resourceGroupName, workspaceName, scenarioName), + nextLink -> listAllNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of scenario runs. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @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 scenario runs along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listAllSinglePage(String resourceGroupName, String workspaceName, + String scenarioName) { + final String accept = "application/json"; + Response res + = service.listAllSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, scenarioName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get a list of scenario runs. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @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 scenario runs along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listAllSinglePage(String resourceGroupName, String workspaceName, + String scenarioName, Context context) { + final String accept = "application/json"; + Response res + = service.listAllSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, scenarioName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get a list of scenario runs. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @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 scenario runs as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAll(String resourceGroupName, String workspaceName, + String scenarioName) { + return new PagedIterable<>(() -> listAllSinglePage(resourceGroupName, workspaceName, scenarioName), + nextLink -> listAllNextSinglePage(nextLink)); + } + + /** + * Get a list of scenario runs. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @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 scenario runs as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAll(String resourceGroupName, String workspaceName, String scenarioName, + Context context) { + return new PagedIterable<>(() -> listAllSinglePage(resourceGroupName, workspaceName, scenarioName, context), + nextLink -> listAllNextSinglePage(nextLink, context)); + } + + /** + * Cancel the currently running scenario execution. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param runId The name of the ScenarioRun. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono cancelWithResponseAsync(String resourceGroupName, String workspaceName, + String scenarioName, String runId) { + return FluxUtil + .withContext(context -> service.cancel(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, scenarioName, runId, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Cancel the currently running scenario execution. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param runId The name of the ScenarioRun. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono cancelAsync(String resourceGroupName, String workspaceName, String scenarioName, String runId) { + return cancelWithResponseAsync(resourceGroupName, workspaceName, scenarioName, runId) + .flatMap(ignored -> Mono.empty()); + } + + /** + * Cancel the currently running scenario execution. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param runId The name of the ScenarioRun. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ScenarioRunsCancelResponse cancelWithResponse(String resourceGroupName, String workspaceName, + String scenarioName, String runId, Context context) { + return service.cancelSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, scenarioName, runId, context); + } + + /** + * Cancel the currently running scenario execution. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param runId The name of the ScenarioRun. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void cancel(String resourceGroupName, String workspaceName, String scenarioName, String runId) { + cancelWithResponse(resourceGroupName, workspaceName, scenarioName, runId, Context.NONE); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of scenario runs along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAllNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listAllNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of scenario runs along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listAllNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listAllNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return 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. + * @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 scenario runs along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listAllNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listAllNextSync(nextLink, this.client.getEndpoint(), accept, context); + return 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/ScenarioRunsImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioRunsImpl.java new file mode 100644 index 000000000000..100fad2e7ad3 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioRunsImpl.java @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.chaos.fluent.ScenarioRunsClient; +import com.azure.resourcemanager.chaos.fluent.models.ScenarioRunInner; +import com.azure.resourcemanager.chaos.models.ScenarioRun; +import com.azure.resourcemanager.chaos.models.ScenarioRuns; +import com.azure.resourcemanager.chaos.models.ScenarioRunsCancelResponse; +import com.azure.resourcemanager.chaos.models.ScenarioRunsGetResponse; + +public final class ScenarioRunsImpl implements ScenarioRuns { + private static final ClientLogger LOGGER = new ClientLogger(ScenarioRunsImpl.class); + + private final ScenarioRunsClient innerClient; + + private final com.azure.resourcemanager.chaos.ChaosManager serviceManager; + + public ScenarioRunsImpl(ScenarioRunsClient innerClient, + com.azure.resourcemanager.chaos.ChaosManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String workspaceName, String scenarioName, + String runId, Context context) { + ScenarioRunsGetResponse inner + = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, scenarioName, runId, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ScenarioRunImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ScenarioRun get(String resourceGroupName, String workspaceName, String scenarioName, String runId) { + ScenarioRunInner inner = this.serviceClient().get(resourceGroupName, workspaceName, scenarioName, runId); + if (inner != null) { + return new ScenarioRunImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable listAll(String resourceGroupName, String workspaceName, String scenarioName) { + PagedIterable inner + = this.serviceClient().listAll(resourceGroupName, workspaceName, scenarioName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ScenarioRunImpl(inner1, this.manager())); + } + + public PagedIterable listAll(String resourceGroupName, String workspaceName, String scenarioName, + Context context) { + PagedIterable inner + = this.serviceClient().listAll(resourceGroupName, workspaceName, scenarioName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ScenarioRunImpl(inner1, this.manager())); + } + + public ScenarioRunsCancelResponse cancelWithResponse(String resourceGroupName, String workspaceName, + String scenarioName, String runId, Context context) { + return this.serviceClient().cancelWithResponse(resourceGroupName, workspaceName, scenarioName, runId, context); + } + + public void cancel(String resourceGroupName, String workspaceName, String scenarioName, String runId) { + this.serviceClient().cancel(resourceGroupName, workspaceName, scenarioName, runId); + } + + private ScenarioRunsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.chaos.ChaosManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenariosClientImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenariosClientImpl.java new file mode 100644 index 000000000000..c10b56539513 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenariosClientImpl.java @@ -0,0 +1,551 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.chaos.fluent.ScenariosClient; +import com.azure.resourcemanager.chaos.fluent.models.ScenarioInner; +import com.azure.resourcemanager.chaos.implementation.models.ScenarioListResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ScenariosClient. + */ +public final class ScenariosClientImpl implements ScenariosClient { + /** + * The proxy service used to perform REST calls. + */ + private final ScenariosService service; + + /** + * The service client containing this operation class. + */ + private final ChaosManagementClientImpl client; + + /** + * Initializes an instance of ScenariosClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ScenariosClientImpl(ChaosManagementClientImpl client) { + this.service + = RestProxy.create(ScenariosService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ChaosManagementClientScenarios to be used by the proxy service to + * perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "ChaosManagementClientScenarios") + public interface ScenariosService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("scenarioName") String scenarioName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("scenarioName") String scenarioName, @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("scenarioName") String scenarioName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ScenarioInner resource, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("scenarioName") String scenarioName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ScenarioInner resource, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("scenarioName") String scenarioName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("scenarioName") String scenarioName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listAll(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listAllSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listAllNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listAllNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get a scenario. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @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 scenario along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, + String scenarioName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, scenarioName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a scenario. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @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 scenario on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String workspaceName, String scenarioName) { + return getWithResponseAsync(resourceGroupName, workspaceName, scenarioName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a scenario. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @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 scenario along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String workspaceName, String scenarioName, + Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, scenarioName, accept, context); + } + + /** + * Get a scenario. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @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 scenario. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ScenarioInner get(String resourceGroupName, String workspaceName, String scenarioName) { + return getWithResponse(resourceGroupName, workspaceName, scenarioName, Context.NONE).getValue(); + } + + /** + * Create or update a scenario. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return model that represents the scenario along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String scenarioName, ScenarioInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, scenarioName, contentType, accept, + resource, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update a scenario. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return model that represents the scenario on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, String scenarioName, + ScenarioInner resource) { + return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, scenarioName, resource) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Create or update a scenario. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return model that represents the scenario along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String scenarioName, ScenarioInner resource, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, scenarioName, contentType, accept, + resource, context); + } + + /** + * Create or update a scenario. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return model that represents the scenario. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ScenarioInner createOrUpdate(String resourceGroupName, String workspaceName, String scenarioName, + ScenarioInner resource) { + return createOrUpdateWithResponse(resourceGroupName, workspaceName, scenarioName, resource, Context.NONE) + .getValue(); + } + + /** + * Delete a scenario. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, + String scenarioName) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, scenarioName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a scenario. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String workspaceName, String scenarioName) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, scenarioName).flatMap(ignored -> Mono.empty()); + } + + /** + * Delete a scenario. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse(String resourceGroupName, String workspaceName, String scenarioName, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, scenarioName, context); + } + + /** + * Delete a scenario. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String workspaceName, String scenarioName) { + deleteWithResponse(resourceGroupName, workspaceName, scenarioName, Context.NONE); + } + + /** + * Get a list of scenarios. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace 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 scenarios along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAllSinglePageAsync(String resourceGroupName, String workspaceName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listAll(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, 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 scenarios. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace 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 scenarios as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAllAsync(String resourceGroupName, String workspaceName) { + return new PagedFlux<>(() -> listAllSinglePageAsync(resourceGroupName, workspaceName), + nextLink -> listAllNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of scenarios. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace 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 scenarios along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listAllSinglePage(String resourceGroupName, String workspaceName) { + final String accept = "application/json"; + Response res = service.listAllSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get a list of scenarios. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of scenarios along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listAllSinglePage(String resourceGroupName, String workspaceName, + Context context) { + final String accept = "application/json"; + Response res = service.listAllSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get a list of scenarios. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace 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 scenarios as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAll(String resourceGroupName, String workspaceName) { + return new PagedIterable<>(() -> listAllSinglePage(resourceGroupName, workspaceName), + nextLink -> listAllNextSinglePage(nextLink)); + } + + /** + * Get a list of scenarios. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of scenarios as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAll(String resourceGroupName, String workspaceName, Context context) { + return new PagedIterable<>(() -> listAllSinglePage(resourceGroupName, workspaceName, context), + nextLink -> listAllNextSinglePage(nextLink, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of scenarios along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAllNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listAllNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of scenarios along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listAllNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listAllNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return 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. + * @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 scenarios along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listAllNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listAllNextSync(nextLink, this.client.getEndpoint(), accept, context); + return 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/ScenariosImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenariosImpl.java new file mode 100644 index 000000000000..161e32e4ac7c --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenariosImpl.java @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.chaos.fluent.ScenariosClient; +import com.azure.resourcemanager.chaos.fluent.models.ScenarioInner; +import com.azure.resourcemanager.chaos.models.Scenario; +import com.azure.resourcemanager.chaos.models.Scenarios; + +public final class ScenariosImpl implements Scenarios { + private static final ClientLogger LOGGER = new ClientLogger(ScenariosImpl.class); + + private final ScenariosClient innerClient; + + private final com.azure.resourcemanager.chaos.ChaosManager serviceManager; + + public ScenariosImpl(ScenariosClient innerClient, com.azure.resourcemanager.chaos.ChaosManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String workspaceName, String scenarioName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, scenarioName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ScenarioImpl(inner.getValue(), this.manager())); + } + + public Scenario get(String resourceGroupName, String workspaceName, String scenarioName) { + ScenarioInner inner = this.serviceClient().get(resourceGroupName, workspaceName, scenarioName); + if (inner != null) { + return new ScenarioImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response deleteWithResponse(String resourceGroupName, String workspaceName, String scenarioName, + Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, scenarioName, context); + } + + public void delete(String resourceGroupName, String workspaceName, String scenarioName) { + this.serviceClient().delete(resourceGroupName, workspaceName, scenarioName); + } + + public PagedIterable listAll(String resourceGroupName, String workspaceName) { + PagedIterable inner = this.serviceClient().listAll(resourceGroupName, workspaceName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ScenarioImpl(inner1, this.manager())); + } + + public PagedIterable listAll(String resourceGroupName, String workspaceName, Context context) { + PagedIterable inner = this.serviceClient().listAll(resourceGroupName, workspaceName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ScenarioImpl(inner1, this.manager())); + } + + public Scenario getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String scenarioName = ResourceManagerUtils.getValueFromIdByName(id, "scenarios"); + if (scenarioName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'scenarios'.", id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, scenarioName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String scenarioName = ResourceManagerUtils.getValueFromIdByName(id, "scenarios"); + if (scenarioName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'scenarios'.", id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, scenarioName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String scenarioName = ResourceManagerUtils.getValueFromIdByName(id, "scenarios"); + if (scenarioName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'scenarios'.", id))); + } + this.deleteWithResponse(resourceGroupName, workspaceName, scenarioName, Context.NONE); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String scenarioName = ResourceManagerUtils.getValueFromIdByName(id, "scenarios"); + if (scenarioName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'scenarios'.", id))); + } + return this.deleteWithResponse(resourceGroupName, workspaceName, scenarioName, context); + } + + private ScenariosClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.chaos.ChaosManager manager() { + return this.serviceManager; + } + + public ScenarioImpl define(String name) { + return new ScenarioImpl(name, this.manager()); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/WorkspaceImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/WorkspaceImpl.java new file mode 100644 index 000000000000..16098597e56e --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/WorkspaceImpl.java @@ -0,0 +1,200 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.chaos.fluent.models.WorkspaceInner; +import com.azure.resourcemanager.chaos.models.ResourceIdentity; +import com.azure.resourcemanager.chaos.models.Workspace; +import com.azure.resourcemanager.chaos.models.WorkspaceEvaluation; +import com.azure.resourcemanager.chaos.models.WorkspaceProperties; +import com.azure.resourcemanager.chaos.models.WorkspaceUpdate; +import java.util.Collections; +import java.util.Map; + +public final class WorkspaceImpl implements Workspace, Workspace.Definition, Workspace.Update { + private WorkspaceInner innerObject; + + private final com.azure.resourcemanager.chaos.ChaosManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public ResourceIdentity identity() { + return this.innerModel().identity(); + } + + public WorkspaceProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public WorkspaceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.chaos.ChaosManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String workspaceName; + + private WorkspaceUpdate updateProperties; + + public WorkspaceImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public Workspace create() { + this.innerObject = serviceManager.serviceClient() + .getWorkspaces() + .createOrUpdate(resourceGroupName, workspaceName, this.innerModel(), Context.NONE); + return this; + } + + public Workspace create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getWorkspaces() + .createOrUpdate(resourceGroupName, workspaceName, this.innerModel(), context); + return this; + } + + WorkspaceImpl(String name, com.azure.resourcemanager.chaos.ChaosManager serviceManager) { + this.innerObject = new WorkspaceInner(); + this.serviceManager = serviceManager; + this.workspaceName = name; + } + + public WorkspaceImpl update() { + this.updateProperties = new WorkspaceUpdate(); + return this; + } + + public Workspace apply() { + this.innerObject = serviceManager.serviceClient() + .getWorkspaces() + .update(resourceGroupName, workspaceName, updateProperties, Context.NONE); + return this; + } + + public Workspace apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getWorkspaces() + .update(resourceGroupName, workspaceName, updateProperties, context); + return this; + } + + WorkspaceImpl(WorkspaceInner innerObject, com.azure.resourcemanager.chaos.ChaosManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); + } + + public Workspace refresh() { + this.innerObject = serviceManager.serviceClient() + .getWorkspaces() + .getByResourceGroupWithResponse(resourceGroupName, workspaceName, Context.NONE) + .getValue(); + return this; + } + + public Workspace refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getWorkspaces() + .getByResourceGroupWithResponse(resourceGroupName, workspaceName, context) + .getValue(); + return this; + } + + public WorkspaceEvaluation refreshRecommendations() { + return serviceManager.workspaces().refreshRecommendations(resourceGroupName, workspaceName); + } + + public WorkspaceEvaluation refreshRecommendations(Context context) { + return serviceManager.workspaces().refreshRecommendations(resourceGroupName, workspaceName, context); + } + + public WorkspaceImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public WorkspaceImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public WorkspaceImpl withProperties(WorkspaceProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public WorkspaceImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateProperties.withTags(tags); + return this; + } + } + + public WorkspaceImpl withIdentity(ResourceIdentity identity) { + if (isInCreateMode()) { + this.innerModel().withIdentity(identity); + return this; + } else { + this.updateProperties.withIdentity(identity); + return this; + } + } + + private boolean isInCreateMode() { + return this.innerModel() == null || this.innerModel().id() == null; + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/WorkspacesClientImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/WorkspacesClientImpl.java new file mode 100644 index 000000000000..55da7b4777e4 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/WorkspacesClientImpl.java @@ -0,0 +1,1322 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.chaos.fluent.WorkspacesClient; +import com.azure.resourcemanager.chaos.fluent.models.WorkspaceInner; +import com.azure.resourcemanager.chaos.implementation.models.WorkspaceListResult; +import com.azure.resourcemanager.chaos.models.WorkspaceEvaluation; +import com.azure.resourcemanager.chaos.models.WorkspaceUpdate; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in WorkspacesClient. + */ +public final class WorkspacesClientImpl implements WorkspacesClient { + /** + * The proxy service used to perform REST calls. + */ + private final WorkspacesService service; + + /** + * The service client containing this operation class. + */ + private final ChaosManagementClientImpl client; + + /** + * Initializes an instance of WorkspacesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + WorkspacesClientImpl(ChaosManagementClientImpl client) { + this.service + = RestProxy.create(WorkspacesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ChaosManagementClientWorkspaces to be used by the proxy service to + * perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "ChaosManagementClientWorkspaces") + public interface WorkspacesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") WorkspaceInner resource, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") WorkspaceInner resource, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") WorkspaceUpdate properties, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") WorkspaceUpdate properties, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("continuationToken") String continuationToken, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("continuationToken") String continuationToken, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/workspaces") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("continuationToken") String continuationToken, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/workspaces") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("continuationToken") String continuationToken, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/refreshRecommendations") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> refreshRecommendations(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/refreshRecommendations") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response refreshRecommendationsSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listAllNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listAllNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get a Workspace resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace 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 Workspace resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String workspaceName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a Workspace resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace 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 Workspace resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String workspaceName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, workspaceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a Workspace resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace 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 Workspace resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, String workspaceName, + Context context) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context); + } + + /** + * Get a Workspace resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace 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 Workspace resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkspaceInner getByResourceGroup(String resourceGroupName, String workspaceName) { + return getByResourceGroupWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); + } + + /** + * Create or update a Workspace resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param resource Workspace resource to be created or updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return model that represents a Workspace resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, WorkspaceInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, contentType, accept, resource, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update a Workspace resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param resource Workspace resource to be created or updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return model that represents a Workspace resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + WorkspaceInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, contentType, accept, resource, + Context.NONE); + } + + /** + * Create or update a Workspace resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param resource Workspace resource to be created or updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return model that represents a Workspace resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + WorkspaceInner resource, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, contentType, accept, resource, context); + } + + /** + * Create or update a Workspace resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param resource Workspace resource to be created or updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of model that represents a Workspace resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkspaceInner> beginCreateOrUpdateAsync(String resourceGroupName, + String workspaceName, WorkspaceInner resource) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, resource); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + WorkspaceInner.class, WorkspaceInner.class, this.client.getContext()); + } + + /** + * Create or update a Workspace resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param resource Workspace resource to be created or updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of model that represents a Workspace resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkspaceInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, WorkspaceInner resource) { + Response response = createOrUpdateWithResponse(resourceGroupName, workspaceName, resource); + return this.client.getLroResult(response, WorkspaceInner.class, + WorkspaceInner.class, Context.NONE); + } + + /** + * Create or update a Workspace resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param resource Workspace resource to be created or updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of model that represents a Workspace resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkspaceInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, WorkspaceInner resource, Context context) { + Response response = createOrUpdateWithResponse(resourceGroupName, workspaceName, resource, context); + return this.client.getLroResult(response, WorkspaceInner.class, + WorkspaceInner.class, context); + } + + /** + * Create or update a Workspace resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param resource Workspace resource to be created or updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return model that represents a Workspace resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, + WorkspaceInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update a Workspace resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param resource Workspace resource to be created or updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return model that represents a Workspace resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceName, WorkspaceInner resource) { + return beginCreateOrUpdate(resourceGroupName, workspaceName, resource).getFinalResult(); + } + + /** + * Create or update a Workspace resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param resource Workspace resource to be created or updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return model that represents a Workspace resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceName, WorkspaceInner resource, + Context context) { + return beginCreateOrUpdate(resourceGroupName, workspaceName, resource, context).getFinalResult(); + } + + /** + * The operation to update a Workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param properties Parameters supplied to the Update Workspace 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 Workspace resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, + WorkspaceUpdate properties) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, contentType, accept, properties, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * The operation to update a Workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param properties Parameters supplied to the Update Workspace 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 Workspace resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String workspaceName, + WorkspaceUpdate properties) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, contentType, accept, properties, + Context.NONE); + } + + /** + * The operation to update a Workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param properties Parameters supplied to the Update Workspace operation. + * @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 Workspace resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String workspaceName, + WorkspaceUpdate properties, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, contentType, accept, properties, + context); + } + + /** + * The operation to update a Workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param properties Parameters supplied to the Update Workspace operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of model that represents a Workspace resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkspaceInner> beginUpdateAsync(String resourceGroupName, + String workspaceName, WorkspaceUpdate properties) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, workspaceName, properties); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + WorkspaceInner.class, WorkspaceInner.class, this.client.getContext()); + } + + /** + * The operation to update a Workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param properties Parameters supplied to the Update Workspace operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of model that represents a Workspace resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkspaceInner> beginUpdate(String resourceGroupName, + String workspaceName, WorkspaceUpdate properties) { + Response response = updateWithResponse(resourceGroupName, workspaceName, properties); + return this.client.getLroResult(response, WorkspaceInner.class, + WorkspaceInner.class, Context.NONE); + } + + /** + * The operation to update a Workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param properties Parameters supplied to the Update Workspace operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of model that represents a Workspace resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkspaceInner> beginUpdate(String resourceGroupName, + String workspaceName, WorkspaceUpdate properties, Context context) { + Response response = updateWithResponse(resourceGroupName, workspaceName, properties, context); + return this.client.getLroResult(response, WorkspaceInner.class, + WorkspaceInner.class, context); + } + + /** + * The operation to update a Workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param properties Parameters supplied to the Update Workspace 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 Workspace resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String workspaceName, + WorkspaceUpdate properties) { + return beginUpdateAsync(resourceGroupName, workspaceName, properties).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * The operation to update a Workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param properties Parameters supplied to the Update Workspace 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 Workspace resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkspaceInner update(String resourceGroupName, String workspaceName, WorkspaceUpdate properties) { + return beginUpdate(resourceGroupName, workspaceName, properties).getFinalResult(); + } + + /** + * The operation to update a Workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param properties Parameters supplied to the Update Workspace operation. + * @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 Workspace resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkspaceInner update(String resourceGroupName, String workspaceName, WorkspaceUpdate properties, + Context context) { + return beginUpdate(resourceGroupName, workspaceName, properties, context).getFinalResult(); + } + + /** + * Delete a Workspace resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a Workspace resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String workspaceName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, Context.NONE); + } + + /** + * Delete a Workspace resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String workspaceName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, context); + } + + /** + * Delete a Workspace resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a Workspace resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName) { + Response response = deleteWithResponse(resourceGroupName, workspaceName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete a Workspace resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + Context context) { + Response response = deleteWithResponse(resourceGroupName, workspaceName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete a Workspace resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String workspaceName) { + return beginDeleteAsync(resourceGroupName, workspaceName).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a Workspace resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String workspaceName) { + beginDelete(resourceGroupName, workspaceName).getFinalResult(); + } + + /** + * Delete a Workspace resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String workspaceName, Context context) { + beginDelete(resourceGroupName, workspaceName, context).getFinalResult(); + } + + /** + * Get a list of Workspace resources in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 Workspace resources in a resource group along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + String continuationToken) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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 Workspace resources in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 Workspace resources in a resource group as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, String continuationToken) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, continuationToken), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of Workspace resources in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Workspace resources in a resource group as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + final String continuationToken = null; + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, continuationToken), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of Workspace resources in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 Workspace resources in a resource group along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, + String continuationToken) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, continuationToken, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get a list of Workspace resources in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 Workspace resources in a resource group along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, + String continuationToken, Context context) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, continuationToken, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get a list of Workspace resources in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Workspace resources in a resource group as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + final String continuationToken = null; + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, continuationToken), + nextLink -> listNextSinglePage(nextLink)); + } + + /** + * Get a list of Workspace resources in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 Workspace resources in a resource group as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, String continuationToken, + Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, continuationToken, context), + nextLink -> listNextSinglePage(nextLink, context)); + } + + /** + * Get a list of all Workspace resources in a subscription. + * + * @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 all Workspace resources in a subscription along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String continuationToken) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), 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 all Workspace resources in a subscription. + * + * @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 all Workspace resources in a subscription as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String continuationToken) { + return new PagedFlux<>(() -> listSinglePageAsync(continuationToken), + nextLink -> listAllNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of all Workspace 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 all Workspace resources in a subscription as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + final String continuationToken = null; + return new PagedFlux<>(() -> listSinglePageAsync(continuationToken), + nextLink -> listAllNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of all Workspace resources in a subscription. + * + * @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 all Workspace resources in a subscription along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String continuationToken) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), continuationToken, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get a list of all Workspace resources in a subscription. + * + * @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 all Workspace resources in a subscription along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String continuationToken, Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), continuationToken, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get a list of all Workspace 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 all Workspace resources in a subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + final String continuationToken = null; + return new PagedIterable<>(() -> listSinglePage(continuationToken), + nextLink -> listAllNextSinglePage(nextLink)); + } + + /** + * Get a list of all Workspace resources in a subscription. + * + * @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 all Workspace resources in a subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String continuationToken, Context context) { + return new PagedIterable<>(() -> listSinglePage(continuationToken, context), + nextLink -> listAllNextSinglePage(nextLink, context)); + } + + /** + * Refreshes recommendation status for all scenarios in a given workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> refreshRecommendationsWithResponseAsync(String resourceGroupName, + String workspaceName) { + return FluxUtil + .withContext( + context -> service.refreshRecommendations(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Refreshes recommendation status for all scenarios in a given workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response refreshRecommendationsWithResponse(String resourceGroupName, String workspaceName) { + return service.refreshRecommendationsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, Context.NONE); + } + + /** + * Refreshes recommendation status for all scenarios in a given workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response refreshRecommendationsWithResponse(String resourceGroupName, String workspaceName, + Context context) { + return service.refreshRecommendationsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, context); + } + + /** + * Refreshes recommendation status for all scenarios in a given workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkspaceEvaluation> + beginRefreshRecommendationsAsync(String resourceGroupName, String workspaceName) { + Mono>> mono + = refreshRecommendationsWithResponseAsync(resourceGroupName, workspaceName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + WorkspaceEvaluation.class, WorkspaceEvaluation.class, this.client.getContext()); + } + + /** + * Refreshes recommendation status for all scenarios in a given workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkspaceEvaluation> + beginRefreshRecommendations(String resourceGroupName, String workspaceName) { + Response response = refreshRecommendationsWithResponse(resourceGroupName, workspaceName); + return this.client.getLroResult(response, WorkspaceEvaluation.class, + WorkspaceEvaluation.class, Context.NONE); + } + + /** + * Refreshes recommendation status for all scenarios in a given workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkspaceEvaluation> + beginRefreshRecommendations(String resourceGroupName, String workspaceName, Context context) { + Response response = refreshRecommendationsWithResponse(resourceGroupName, workspaceName, context); + return this.client.getLroResult(response, WorkspaceEvaluation.class, + WorkspaceEvaluation.class, context); + } + + /** + * Refreshes recommendation status for all scenarios in a given workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono refreshRecommendationsAsync(String resourceGroupName, String workspaceName) { + return beginRefreshRecommendationsAsync(resourceGroupName, workspaceName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Refreshes recommendation status for all scenarios in a given workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkspaceEvaluation refreshRecommendations(String resourceGroupName, String workspaceName) { + return beginRefreshRecommendations(resourceGroupName, workspaceName).getFinalResult(); + } + + /** + * Refreshes recommendation status for all scenarios in a given workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkspaceEvaluation refreshRecommendations(String resourceGroupName, String workspaceName, Context context) { + return beginRefreshRecommendations(resourceGroupName, workspaceName, context).getFinalResult(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Workspace resources in a resource group along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Workspace resources in a resource group along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return 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. + * @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 Workspace resources in a resource group along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return 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. + * @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 all Workspace resources in a subscription along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAllNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listAllNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of all Workspace resources in a subscription along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listAllNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listAllNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return 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. + * @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 all Workspace resources in a subscription along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listAllNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listAllNextSync(nextLink, this.client.getEndpoint(), accept, context); + return 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/WorkspacesImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/WorkspacesImpl.java new file mode 100644 index 000000000000..d9fe243a52a0 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/WorkspacesImpl.java @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.chaos.fluent.WorkspacesClient; +import com.azure.resourcemanager.chaos.fluent.models.WorkspaceInner; +import com.azure.resourcemanager.chaos.models.Workspace; +import com.azure.resourcemanager.chaos.models.WorkspaceEvaluation; +import com.azure.resourcemanager.chaos.models.Workspaces; + +public final class WorkspacesImpl implements Workspaces { + private static final ClientLogger LOGGER = new ClientLogger(WorkspacesImpl.class); + + private final WorkspacesClient innerClient; + + private final com.azure.resourcemanager.chaos.ChaosManager serviceManager; + + public WorkspacesImpl(WorkspacesClient innerClient, com.azure.resourcemanager.chaos.ChaosManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getByResourceGroupWithResponse(String resourceGroupName, String workspaceName, + Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, workspaceName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new WorkspaceImpl(inner.getValue(), this.manager())); + } + + public Workspace getByResourceGroup(String resourceGroupName, String workspaceName) { + WorkspaceInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, workspaceName); + if (inner != null) { + return new WorkspaceImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String workspaceName) { + this.serviceClient().delete(resourceGroupName, workspaceName); + } + + public void delete(String resourceGroupName, String workspaceName, Context context) { + this.serviceClient().delete(resourceGroupName, workspaceName, context); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, String continuationToken, + Context context) { + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, continuationToken, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); + } + + public PagedIterable list(String continuationToken, Context context) { + PagedIterable inner = this.serviceClient().list(continuationToken, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); + } + + public WorkspaceEvaluation refreshRecommendations(String resourceGroupName, String workspaceName) { + return this.serviceClient().refreshRecommendations(resourceGroupName, workspaceName); + } + + public WorkspaceEvaluation refreshRecommendations(String resourceGroupName, String workspaceName, Context context) { + return this.serviceClient().refreshRecommendations(resourceGroupName, workspaceName, context); + } + + public Workspace getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, workspaceName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + this.delete(resourceGroupName, workspaceName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + this.delete(resourceGroupName, workspaceName, context); + } + + private WorkspacesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.chaos.ChaosManager manager() { + return this.serviceManager; + } + + public WorkspaceImpl define(String name) { + return new WorkspaceImpl(name, this.manager()); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/ActionListResult.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/ActionListResult.java new file mode 100644 index 000000000000..6cbaff50fbc4 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/ActionListResult.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.chaos.fluent.models.ActionInner; +import java.io.IOException; +import java.util.List; + +/** + * Model that represents a list of Action resources and a link for pagination. + */ +@Immutable +public final class ActionListResult implements JsonSerializable { + /* + * The Action items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ActionListResult class. + */ + private ActionListResult() { + } + + /** + * Get the value property: The Action items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ActionListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ActionListResult if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ActionListResult. + */ + public static ActionListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ActionListResult deserializedActionListResult = new ActionListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> ActionInner.fromJson(reader1)); + deserializedActionListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedActionListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedActionListResult; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/ActionVersionListResult.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/ActionVersionListResult.java new file mode 100644 index 000000000000..6ecf2dcbef10 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/ActionVersionListResult.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.chaos.fluent.models.ActionVersionInner; +import java.io.IOException; +import java.util.List; + +/** + * Model that represents a list of Action Version resources and a link for pagination. + */ +@Immutable +public final class ActionVersionListResult implements JsonSerializable { + /* + * The ActionVersion items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ActionVersionListResult class. + */ + private ActionVersionListResult() { + } + + /** + * Get the value property: The ActionVersion items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ActionVersionListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ActionVersionListResult if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ActionVersionListResult. + */ + public static ActionVersionListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ActionVersionListResult deserializedActionVersionListResult = new ActionVersionListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> ActionVersionInner.fromJson(reader1)); + deserializedActionVersionListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedActionVersionListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedActionVersionListResult; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/DiscoveredResourceListResult.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/DiscoveredResourceListResult.java new file mode 100644 index 000000000000..ecfc9b5b6795 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/DiscoveredResourceListResult.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.chaos.fluent.models.DiscoveredResourceInner; +import java.io.IOException; +import java.util.List; + +/** + * Model that represents a list of discovered resources and a link for pagination. + */ +@Immutable +public final class DiscoveredResourceListResult implements JsonSerializable { + /* + * The DiscoveredResource items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of DiscoveredResourceListResult class. + */ + private DiscoveredResourceListResult() { + } + + /** + * Get the value property: The DiscoveredResource items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DiscoveredResourceListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DiscoveredResourceListResult if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the DiscoveredResourceListResult. + */ + public static DiscoveredResourceListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DiscoveredResourceListResult deserializedDiscoveredResourceListResult = new DiscoveredResourceListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> DiscoveredResourceInner.fromJson(reader1)); + deserializedDiscoveredResourceListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedDiscoveredResourceListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDiscoveredResourceListResult; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/PrivateAccessListResult.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/PrivateAccessListResult.java new file mode 100644 index 000000000000..f510943038b7 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/PrivateAccessListResult.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.chaos.fluent.models.PrivateAccessInner; +import java.io.IOException; +import java.util.List; + +/** + * Model that represents a list of private access resources and a link for pagination. + */ +@Immutable +public final class PrivateAccessListResult implements JsonSerializable { + /* + * The PrivateAccess items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of PrivateAccessListResult class. + */ + private PrivateAccessListResult() { + } + + /** + * Get the value property: The PrivateAccess items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateAccessListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateAccessListResult if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PrivateAccessListResult. + */ + public static PrivateAccessListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateAccessListResult deserializedPrivateAccessListResult = new PrivateAccessListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> PrivateAccessInner.fromJson(reader1)); + deserializedPrivateAccessListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedPrivateAccessListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateAccessListResult; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/PrivateEndpointConnectionListResult.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/PrivateEndpointConnectionListResult.java new file mode 100644 index 000000000000..47f8d1c11ebe --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/PrivateEndpointConnectionListResult.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.chaos.fluent.models.PrivateEndpointConnectionInner; +import java.io.IOException; +import java.util.List; + +/** + * A list of private link resources. + */ +@Immutable +public final class PrivateEndpointConnectionListResult + implements JsonSerializable { + /* + * The PrivateEndpointConnection items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of PrivateEndpointConnectionListResult class. + */ + private PrivateEndpointConnectionListResult() { + } + + /** + * Get the value property: The PrivateEndpointConnection items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateEndpointConnectionListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateEndpointConnectionListResult if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PrivateEndpointConnectionListResult. + */ + public static PrivateEndpointConnectionListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateEndpointConnectionListResult deserializedPrivateEndpointConnectionListResult + = new PrivateEndpointConnectionListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> PrivateEndpointConnectionInner.fromJson(reader1)); + deserializedPrivateEndpointConnectionListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedPrivateEndpointConnectionListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateEndpointConnectionListResult; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/ScenarioConfigurationListResult.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/ScenarioConfigurationListResult.java new file mode 100644 index 000000000000..210b31af9d38 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/ScenarioConfigurationListResult.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.chaos.fluent.models.ScenarioConfigurationInner; +import java.io.IOException; +import java.util.List; + +/** + * Model that represents a list of scenario configurations and a link for pagination. + */ +@Immutable +public final class ScenarioConfigurationListResult implements JsonSerializable { + /* + * The ScenarioConfiguration items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ScenarioConfigurationListResult class. + */ + private ScenarioConfigurationListResult() { + } + + /** + * Get the value property: The ScenarioConfiguration items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ScenarioConfigurationListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ScenarioConfigurationListResult if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ScenarioConfigurationListResult. + */ + public static ScenarioConfigurationListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ScenarioConfigurationListResult deserializedScenarioConfigurationListResult + = new ScenarioConfigurationListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ScenarioConfigurationInner.fromJson(reader1)); + deserializedScenarioConfigurationListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedScenarioConfigurationListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedScenarioConfigurationListResult; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/ScenarioListResult.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/ScenarioListResult.java new file mode 100644 index 000000000000..dc143ae3287d --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/ScenarioListResult.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.chaos.fluent.models.ScenarioInner; +import java.io.IOException; +import java.util.List; + +/** + * Model that represents a list of scenarios and a link for pagination. + */ +@Immutable +public final class ScenarioListResult implements JsonSerializable { + /* + * The Scenario items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ScenarioListResult class. + */ + private ScenarioListResult() { + } + + /** + * Get the value property: The Scenario items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ScenarioListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ScenarioListResult if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ScenarioListResult. + */ + public static ScenarioListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ScenarioListResult deserializedScenarioListResult = new ScenarioListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> ScenarioInner.fromJson(reader1)); + deserializedScenarioListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedScenarioListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedScenarioListResult; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/ScenarioRunListResult.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/ScenarioRunListResult.java new file mode 100644 index 000000000000..5a466e012486 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/ScenarioRunListResult.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.chaos.fluent.models.ScenarioRunInner; +import java.io.IOException; +import java.util.List; + +/** + * Model that represents a list of scenario runs and a link for pagination. + */ +@Immutable +public final class ScenarioRunListResult implements JsonSerializable { + /* + * The ScenarioRun items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ScenarioRunListResult class. + */ + private ScenarioRunListResult() { + } + + /** + * Get the value property: The ScenarioRun items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ScenarioRunListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ScenarioRunListResult if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ScenarioRunListResult. + */ + public static ScenarioRunListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ScenarioRunListResult deserializedScenarioRunListResult = new ScenarioRunListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> ScenarioRunInner.fromJson(reader1)); + deserializedScenarioRunListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedScenarioRunListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedScenarioRunListResult; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/WorkspaceListResult.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/WorkspaceListResult.java new file mode 100644 index 000000000000..4ad6d6c43899 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/WorkspaceListResult.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.chaos.fluent.models.WorkspaceInner; +import java.io.IOException; +import java.util.List; + +/** + * Model that represents a list of Workspace resources and a link for pagination. + */ +@Immutable +public final class WorkspaceListResult implements JsonSerializable { + /* + * The Workspace items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of WorkspaceListResult class. + */ + private WorkspaceListResult() { + } + + /** + * Get the value property: The Workspace items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WorkspaceListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkspaceListResult if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the WorkspaceListResult. + */ + public static WorkspaceListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkspaceListResult deserializedWorkspaceListResult = new WorkspaceListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> WorkspaceInner.fromJson(reader1)); + deserializedWorkspaceListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedWorkspaceListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedWorkspaceListResult; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Action.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Action.java new file mode 100644 index 000000000000..7a26c069bd20 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Action.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.chaos.fluent.models.ActionInner; +import java.util.List; + +/** + * An immutable client-side representation of Action. + */ +public interface Action { + /** + * 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: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the canonicalId property: Canonical identifier of the action (e.g., "microsoft-compute-shutdown/1.0"). + * + * @return the canonicalId value. + */ + String canonicalId(); + + /** + * Gets the displayName property: Human-readable display name of the action. + * + * @return the displayName value. + */ + String displayName(); + + /** + * Gets the description property: Description of what this action does. + * + * @return the description value. + */ + String description(); + + /** + * Gets the actionName property: The short name of the action (e.g., "Shutdown"). + * + * @return the actionName value. + */ + String actionName(); + + /** + * Gets the version property: The version of the action (e.g., "1.0.0"). + * + * @return the version value. + */ + String version(); + + /** + * Gets the actionType property: The type of the action. + * + * @return the actionType value. + */ + ActionKind actionType(); + + /** + * Gets the supportedTargetTypes property: List of target types supported by this action. + * + * @return the supportedTargetTypes value. + */ + List supportedTargetTypes(); + + /** + * Gets the parametersSchema property: JSON Schema describing the parameters for this action. + * + * @return the parametersSchema value. + */ + ActionPropertiesParametersSchema parametersSchema(); + + /** + * Gets the recommendedRoles property: Recommended Azure RBAC role definition GUIDs for this action. + * + * @return the recommendedRoles value. + */ + List recommendedRoles(); + + /** + * Gets the inner com.azure.resourcemanager.chaos.fluent.models.ActionInner object. + * + * @return the inner object. + */ + ActionInner innerModel(); +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionDependency.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionDependency.java new file mode 100644 index 000000000000..98fecebc3ca3 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionDependency.java @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Model that represents an action dependency. + */ +@Fluent +public final class ActionDependency implements JsonSerializable { + /* + * The type of dependency. + */ + private ActionDependencyType type; + + /* + * Name of the action this depends on. + */ + private String name; + + /* + * The lifecycle state of the dependency action that triggers this action to start. + */ + private ActionLifecycle onActionLifecycle; + + /** + * Creates an instance of ActionDependency class. + */ + public ActionDependency() { + } + + /** + * Get the type property: The type of dependency. + * + * @return the type value. + */ + public ActionDependencyType type() { + return this.type; + } + + /** + * Set the type property: The type of dependency. + * + * @param type the type value to set. + * @return the ActionDependency object itself. + */ + public ActionDependency withType(ActionDependencyType type) { + this.type = type; + return this; + } + + /** + * Get the name property: Name of the action this depends on. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of the action this depends on. + * + * @param name the name value to set. + * @return the ActionDependency object itself. + */ + public ActionDependency withName(String name) { + this.name = name; + return this; + } + + /** + * Get the onActionLifecycle property: The lifecycle state of the dependency action that triggers this action to + * start. + * + * @return the onActionLifecycle value. + */ + public ActionLifecycle onActionLifecycle() { + return this.onActionLifecycle; + } + + /** + * Set the onActionLifecycle property: The lifecycle state of the dependency action that triggers this action to + * start. + * + * @param onActionLifecycle the onActionLifecycle value to set. + * @return the ActionDependency object itself. + */ + public ActionDependency withOnActionLifecycle(ActionLifecycle onActionLifecycle) { + this.onActionLifecycle = onActionLifecycle; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("onActionLifecycle", + this.onActionLifecycle == null ? null : this.onActionLifecycle.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ActionDependency from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ActionDependency if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ActionDependency. + */ + public static ActionDependency fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ActionDependency deserializedActionDependency = new ActionDependency(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedActionDependency.type = ActionDependencyType.fromString(reader.getString()); + } else if ("name".equals(fieldName)) { + deserializedActionDependency.name = reader.getString(); + } else if ("onActionLifecycle".equals(fieldName)) { + deserializedActionDependency.onActionLifecycle = ActionLifecycle.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedActionDependency; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionDependencyType.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionDependencyType.java new file mode 100644 index 000000000000..5eeefb1eb653 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionDependencyType.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Enum for action dependency type. + */ +public final class ActionDependencyType extends ExpandableStringEnum { + /** + * Action dependency type. + */ + public static final ActionDependencyType ACTION = fromString("Action"); + + /** + * Creates a new instance of ActionDependencyType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ActionDependencyType() { + } + + /** + * Creates or finds a ActionDependencyType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ActionDependencyType. + */ + public static ActionDependencyType fromString(String name) { + return fromString(name, ActionDependencyType.class); + } + + /** + * Gets known ActionDependencyType values. + * + * @return known ActionDependencyType values. + */ + public static Collection values() { + return values(ActionDependencyType.class); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionKind.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionKind.java new file mode 100644 index 000000000000..d1c9b9e2a125 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionKind.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Union of action types. + */ +public final class ActionKind extends ExpandableStringEnum { + /** + * Discrete action type. + */ + public static final ActionKind DISCRETE = fromString("Discrete"); + + /** + * Continuous action type. + */ + public static final ActionKind CONTINUOUS = fromString("Continuous"); + + /** + * Cancelable action type. + */ + public static final ActionKind CANCELABLE = fromString("Cancelable"); + + /** + * Creates a new instance of ActionKind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ActionKind() { + } + + /** + * Creates or finds a ActionKind from its string representation. + * + * @param name a name to look for. + * @return the corresponding ActionKind. + */ + public static ActionKind fromString(String name) { + return fromString(name, ActionKind.class); + } + + /** + * Gets known ActionKind values. + * + * @return known ActionKind values. + */ + public static Collection values() { + return values(ActionKind.class); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionLifecycle.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionLifecycle.java new file mode 100644 index 000000000000..e12bcdba07ae --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionLifecycle.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Enum for action lifecycle states. + */ +public final class ActionLifecycle extends ExpandableStringEnum { + /** + * Trigger when action reaches any terminal state. + */ + public static final ActionLifecycle ANY_TERMINAL = fromString("AnyTerminal"); + + /** + * Trigger when action starts. + */ + public static final ActionLifecycle START = fromString("Start"); + + /** + * Trigger when action is running. + */ + public static final ActionLifecycle RUNNING = fromString("Running"); + + /** + * Trigger on success. + */ + public static final ActionLifecycle SUCCESS = fromString("Success"); + + /** + * Trigger on failure. + */ + public static final ActionLifecycle FAILURE = fromString("Failure"); + + /** + * Trigger when action is skipped. + */ + public static final ActionLifecycle SKIPPED = fromString("Skipped"); + + /** + * Creates a new instance of ActionLifecycle value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ActionLifecycle() { + } + + /** + * Creates or finds a ActionLifecycle from its string representation. + * + * @param name a name to look for. + * @return the corresponding ActionLifecycle. + */ + public static ActionLifecycle fromString(String name) { + return fromString(name, ActionLifecycle.class); + } + + /** + * Gets known ActionLifecycle values. + * + * @return known ActionLifecycle values. + */ + public static Collection values() { + return values(ActionLifecycle.class); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionPropertiesParametersSchema.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionPropertiesParametersSchema.java new file mode 100644 index 000000000000..7fd7cac761d6 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionPropertiesParametersSchema.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The ActionPropertiesParametersSchema model. + */ +@Immutable +public final class ActionPropertiesParametersSchema implements JsonSerializable { + /** + * Creates an instance of ActionPropertiesParametersSchema class. + */ + private ActionPropertiesParametersSchema() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ActionPropertiesParametersSchema from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ActionPropertiesParametersSchema if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ActionPropertiesParametersSchema. + */ + public static ActionPropertiesParametersSchema fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ActionPropertiesParametersSchema deserializedActionPropertiesParametersSchema + = new ActionPropertiesParametersSchema(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + reader.skipChildren(); + } + + return deserializedActionPropertiesParametersSchema; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionSupportedTargetType.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionSupportedTargetType.java new file mode 100644 index 000000000000..b0db91a883c5 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionSupportedTargetType.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Model that represents a target type supported by an action. + */ +@Immutable +public final class ActionSupportedTargetType implements JsonSerializable { + /* + * The Azure resource type (e.g., "Microsoft.Compute/virtualMachines"). + */ + private String targetType; + + /* + * List of Azure permissions required for this target type. + */ + private List requiredPermissions; + + /** + * Creates an instance of ActionSupportedTargetType class. + */ + private ActionSupportedTargetType() { + } + + /** + * Get the targetType property: The Azure resource type (e.g., "Microsoft.Compute/virtualMachines"). + * + * @return the targetType value. + */ + public String targetType() { + return this.targetType; + } + + /** + * Get the requiredPermissions property: List of Azure permissions required for this target type. + * + * @return the requiredPermissions value. + */ + public List requiredPermissions() { + return this.requiredPermissions; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("targetType", this.targetType); + jsonWriter.writeArrayField("requiredPermissions", this.requiredPermissions, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ActionSupportedTargetType from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ActionSupportedTargetType if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ActionSupportedTargetType. + */ + public static ActionSupportedTargetType fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ActionSupportedTargetType deserializedActionSupportedTargetType = new ActionSupportedTargetType(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("targetType".equals(fieldName)) { + deserializedActionSupportedTargetType.targetType = reader.getString(); + } else if ("requiredPermissions".equals(fieldName)) { + List requiredPermissions = reader.readArray(reader1 -> reader1.getString()); + deserializedActionSupportedTargetType.requiredPermissions = requiredPermissions; + } else { + reader.skipChildren(); + } + } + + return deserializedActionSupportedTargetType; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionVersion.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionVersion.java new file mode 100644 index 000000000000..a13a1121787b --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionVersion.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.chaos.fluent.models.ActionVersionInner; +import java.util.List; + +/** + * An immutable client-side representation of ActionVersion. + */ +public interface ActionVersion { + /** + * 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: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the canonicalId property: Canonical identifier of the action (e.g., "microsoft-compute-shutdown/1.0"). + * + * @return the canonicalId value. + */ + String canonicalId(); + + /** + * Gets the displayName property: Human-readable display name of the action. + * + * @return the displayName value. + */ + String displayName(); + + /** + * Gets the description property: Description of what this action does. + * + * @return the description value. + */ + String description(); + + /** + * Gets the actionName property: The short name of the action (e.g., "Shutdown"). + * + * @return the actionName value. + */ + String actionName(); + + /** + * Gets the version property: The version of the action (e.g., "1.0.0"). + * + * @return the version value. + */ + String version(); + + /** + * Gets the actionType property: The type of the action. + * + * @return the actionType value. + */ + ActionKind actionType(); + + /** + * Gets the supportedTargetTypes property: List of target types supported by this action. + * + * @return the supportedTargetTypes value. + */ + List supportedTargetTypes(); + + /** + * Gets the parametersSchema property: JSON Schema describing the parameters for this action. + * + * @return the parametersSchema value. + */ + ActionPropertiesParametersSchema parametersSchema(); + + /** + * Gets the recommendedRoles property: Recommended Azure RBAC role definition GUIDs for this action. + * + * @return the recommendedRoles value. + */ + List recommendedRoles(); + + /** + * Gets the inner com.azure.resourcemanager.chaos.fluent.models.ActionVersionInner object. + * + * @return the inner object. + */ + ActionVersionInner innerModel(); +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionVersions.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionVersions.java new file mode 100644 index 000000000000..fa6b2361dd1d --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionVersions.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of ActionVersions. + */ +public interface ActionVersions { + /** + * Get an Action Version resource for a given location and action. + * + * @param location The name of the Azure region. + * @param actionName String that represents an Action resource name. + * @param versionName String that represents an Action Version resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Action Version resource for a given location and action along with {@link Response}. + */ + Response getWithResponse(String location, String actionName, String versionName, Context context); + + /** + * Get an Action Version resource for a given location and action. + * + * @param location The name of the Azure region. + * @param actionName String that represents an Action resource name. + * @param versionName String that represents an Action Version 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 an Action Version resource for a given location and action. + */ + ActionVersion get(String location, String actionName, String versionName); + + /** + * Get a list of Action Version resources for a given location and action. + * + * @param location The name of the Azure region. + * @param actionName String that represents an Action 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 Action Version resources for a given location and action as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String location, String actionName); + + /** + * Get a list of Action Version resources for a given location and action. + * + * @param location The name of the Azure region. + * @param actionName String that represents an Action resource name. + * @param continuationToken String that sets the continuation token. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Action Version resources for a given location and action as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String location, String actionName, String continuationToken, Context context); +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Actions.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Actions.java new file mode 100644 index 000000000000..2589636bf0f1 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Actions.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of Actions. + */ +public interface Actions { + /** + * Get an Action resource for a given location. + * + * @param location The name of the Azure region. + * @param actionName String that represents an Action resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Action resource for a given location along with {@link Response}. + */ + Response getWithResponse(String location, String actionName, Context context); + + /** + * Get an Action resource for a given location. + * + * @param location The name of the Azure region. + * @param actionName String that represents an Action 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 an Action resource for a given location. + */ + Action get(String location, String actionName); + + /** + * Get a list of Action resources for a given location. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Action resources for a given location as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String location); + + /** + * Get a list of Action resources for a given location. + * + * @param location The name of the Azure region. + * @param continuationToken String that sets the continuation token. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 Action resources for a given location as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String location, String continuationToken, Context context); +} 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 515aef4335a8..5d2cb354722f 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 @@ -74,6 +74,14 @@ public interface Capability { */ String urn(); + /** + * Gets the provisioningState property: Resource provisioning state. Not currently in use because resource is + * created synchronously. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + /** * Gets the inner com.azure.resourcemanager.chaos.fluent.models.CapabilityInner object. * diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ConfigurationExclusions.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ConfigurationExclusions.java new file mode 100644 index 000000000000..c35646799c9a --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ConfigurationExclusions.java @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Model that represents exclusion criteria for protecting resources from fault injection. + * Uses union (OR) logic - a resource is excluded if it matches ANY criteria. + */ +@Fluent +public final class ConfigurationExclusions implements JsonSerializable { + /* + * Array of specific resource IDs to exclude from fault injection. + */ + private List resources; + + /* + * Array of tag key-value pairs. Resources with matching tags are excluded. + */ + private List tags; + + /* + * Array of resource types. All resources of these types are excluded. + */ + private List types; + + /** + * Creates an instance of ConfigurationExclusions class. + */ + public ConfigurationExclusions() { + } + + /** + * Get the resources property: Array of specific resource IDs to exclude from fault injection. + * + * @return the resources value. + */ + public List resources() { + return this.resources; + } + + /** + * Set the resources property: Array of specific resource IDs to exclude from fault injection. + * + * @param resources the resources value to set. + * @return the ConfigurationExclusions object itself. + */ + public ConfigurationExclusions withResources(List resources) { + this.resources = resources; + return this; + } + + /** + * Get the tags property: Array of tag key-value pairs. Resources with matching tags are excluded. + * + * @return the tags value. + */ + public List tags() { + return this.tags; + } + + /** + * Set the tags property: Array of tag key-value pairs. Resources with matching tags are excluded. + * + * @param tags the tags value to set. + * @return the ConfigurationExclusions object itself. + */ + public ConfigurationExclusions withTags(List tags) { + this.tags = tags; + return this; + } + + /** + * Get the types property: Array of resource types. All resources of these types are excluded. + * + * @return the types value. + */ + public List types() { + return this.types; + } + + /** + * Set the types property: Array of resource types. All resources of these types are excluded. + * + * @param types the types value to set. + * @return the ConfigurationExclusions object itself. + */ + public ConfigurationExclusions withTypes(List types) { + this.types = types; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("resources", this.resources, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("tags", this.tags, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("types", this.types, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ConfigurationExclusions from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ConfigurationExclusions if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the ConfigurationExclusions. + */ + public static ConfigurationExclusions fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ConfigurationExclusions deserializedConfigurationExclusions = new ConfigurationExclusions(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resources".equals(fieldName)) { + List resources = reader.readArray(reader1 -> reader1.getString()); + deserializedConfigurationExclusions.resources = resources; + } else if ("tags".equals(fieldName)) { + List tags = reader.readArray(reader1 -> KeyValuePair.fromJson(reader1)); + deserializedConfigurationExclusions.tags = tags; + } else if ("types".equals(fieldName)) { + List types = reader.readArray(reader1 -> reader1.getString()); + deserializedConfigurationExclusions.types = types; + } else { + reader.skipChildren(); + } + } + + return deserializedConfigurationExclusions; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ConfigurationFilters.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ConfigurationFilters.java new file mode 100644 index 000000000000..6d944b2c8d55 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ConfigurationFilters.java @@ -0,0 +1,203 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Model that represents filter criteria for constraining which discovered + * resources participate in fault injection. + * + * Uses intersection (AND) logic — a resource is included only if it matches all criteria. + */ +@Fluent +public final class ConfigurationFilters implements JsonSerializable { + /* + * Array of Azure location strings. Only resources in these locations are included. + * + * Null or omitted means all locations (no filter). Empty array means include nothing. + */ + private List locations; + + /* + * Array of availability zone identifiers ("1", "2", "3", "zone-redundant"). + * Only resources whose zones intersect this list are included. + * + * Null or omitted means all zones (including non-zonal). Empty array means include nothing. + * + * Mutually exclusive with `physicalZones` — set one or the other, not both. + */ + private List zones; + + /* + * Array of physical availability zone identifiers in `{region}-az{N}` format + * (e.g., `"westus2-az1"`). Only resources in the corresponding logical zone + * for each subscription are included. + * + * At execution time, each physical zone is resolved to per-subscription + * logical zones via the Azure locations API. The resolved mapping is surfaced + * on the scenario run response (`zoneResolution`). + * + * Null or omitted means physical zone targeting is not used. + * Only one physical zone is supported in preview. + * + * Mutually exclusive with `zones` — set one or the other, not both. + */ + private List physicalZones; + + /** + * Creates an instance of ConfigurationFilters class. + */ + public ConfigurationFilters() { + } + + /** + * Get the locations property: Array of Azure location strings. Only resources in these locations are included. + * + * Null or omitted means all locations (no filter). Empty array means include nothing. + * + * @return the locations value. + */ + public List locations() { + return this.locations; + } + + /** + * Set the locations property: Array of Azure location strings. Only resources in these locations are included. + * + * Null or omitted means all locations (no filter). Empty array means include nothing. + * + * @param locations the locations value to set. + * @return the ConfigurationFilters object itself. + */ + public ConfigurationFilters withLocations(List locations) { + this.locations = locations; + return this; + } + + /** + * Get the zones property: Array of availability zone identifiers ("1", "2", "3", "zone-redundant"). + * Only resources whose zones intersect this list are included. + * + * Null or omitted means all zones (including non-zonal). Empty array means include nothing. + * + * Mutually exclusive with `physicalZones` — set one or the other, not both. + * + * @return the zones value. + */ + public List zones() { + return this.zones; + } + + /** + * Set the zones property: Array of availability zone identifiers ("1", "2", "3", "zone-redundant"). + * Only resources whose zones intersect this list are included. + * + * Null or omitted means all zones (including non-zonal). Empty array means include nothing. + * + * Mutually exclusive with `physicalZones` — set one or the other, not both. + * + * @param zones the zones value to set. + * @return the ConfigurationFilters object itself. + */ + public ConfigurationFilters withZones(List zones) { + this.zones = zones; + return this; + } + + /** + * Get the physicalZones property: Array of physical availability zone identifiers in `{region}-az{N}` format + * (e.g., `"westus2-az1"`). Only resources in the corresponding logical zone + * for each subscription are included. + * + * At execution time, each physical zone is resolved to per-subscription + * logical zones via the Azure locations API. The resolved mapping is surfaced + * on the scenario run response (`zoneResolution`). + * + * Null or omitted means physical zone targeting is not used. + * Only one physical zone is supported in preview. + * + * Mutually exclusive with `zones` — set one or the other, not both. + * + * @return the physicalZones value. + */ + public List physicalZones() { + return this.physicalZones; + } + + /** + * Set the physicalZones property: Array of physical availability zone identifiers in `{region}-az{N}` format + * (e.g., `"westus2-az1"`). Only resources in the corresponding logical zone + * for each subscription are included. + * + * At execution time, each physical zone is resolved to per-subscription + * logical zones via the Azure locations API. The resolved mapping is surfaced + * on the scenario run response (`zoneResolution`). + * + * Null or omitted means physical zone targeting is not used. + * Only one physical zone is supported in preview. + * + * Mutually exclusive with `zones` — set one or the other, not both. + * + * @param physicalZones the physicalZones value to set. + * @return the ConfigurationFilters object itself. + */ + public ConfigurationFilters withPhysicalZones(List physicalZones) { + this.physicalZones = physicalZones; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("locations", this.locations, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("zones", this.zones, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("physicalZones", this.physicalZones, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ConfigurationFilters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ConfigurationFilters if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the ConfigurationFilters. + */ + public static ConfigurationFilters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ConfigurationFilters deserializedConfigurationFilters = new ConfigurationFilters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("locations".equals(fieldName)) { + List locations = reader.readArray(reader1 -> reader1.getString()); + deserializedConfigurationFilters.locations = locations; + } else if ("zones".equals(fieldName)) { + List zones = reader.readArray(reader1 -> reader1.getString()); + deserializedConfigurationFilters.zones = zones; + } else if ("physicalZones".equals(fieldName)) { + List physicalZones = reader.readArray(reader1 -> reader1.getString()); + deserializedConfigurationFilters.physicalZones = physicalZones; + } else { + reader.skipChildren(); + } + } + + return deserializedConfigurationFilters; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/CustomerDataStorageProperties.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/CustomerDataStorageProperties.java new file mode 100644 index 000000000000..f0d7b40f006a --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/CustomerDataStorageProperties.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Model that represents the Customer Managed Storage for an Experiment. + */ +@Fluent +public final class CustomerDataStorageProperties implements JsonSerializable { + /* + * Azure Resource ID of the Storage account to use for Customer Data storage. + */ + private String storageAccountResourceId; + + /* + * Name of the Azure Blob Storage container to use or create. + */ + private String blobContainerName; + + /** + * Creates an instance of CustomerDataStorageProperties class. + */ + public CustomerDataStorageProperties() { + } + + /** + * Get the storageAccountResourceId property: Azure Resource ID of the Storage account to use for Customer Data + * storage. + * + * @return the storageAccountResourceId value. + */ + public String storageAccountResourceId() { + return this.storageAccountResourceId; + } + + /** + * Set the storageAccountResourceId property: Azure Resource ID of the Storage account to use for Customer Data + * storage. + * + * @param storageAccountResourceId the storageAccountResourceId value to set. + * @return the CustomerDataStorageProperties object itself. + */ + public CustomerDataStorageProperties withStorageAccountResourceId(String storageAccountResourceId) { + this.storageAccountResourceId = storageAccountResourceId; + return this; + } + + /** + * Get the blobContainerName property: Name of the Azure Blob Storage container to use or create. + * + * @return the blobContainerName value. + */ + public String blobContainerName() { + return this.blobContainerName; + } + + /** + * Set the blobContainerName property: Name of the Azure Blob Storage container to use or create. + * + * @param blobContainerName the blobContainerName value to set. + * @return the CustomerDataStorageProperties object itself. + */ + public CustomerDataStorageProperties withBlobContainerName(String blobContainerName) { + this.blobContainerName = blobContainerName; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("storageAccountResourceId", this.storageAccountResourceId); + jsonWriter.writeStringField("blobContainerName", this.blobContainerName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CustomerDataStorageProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CustomerDataStorageProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the CustomerDataStorageProperties. + */ + public static CustomerDataStorageProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CustomerDataStorageProperties deserializedCustomerDataStorageProperties + = new CustomerDataStorageProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("storageAccountResourceId".equals(fieldName)) { + deserializedCustomerDataStorageProperties.storageAccountResourceId = reader.getString(); + } else if ("blobContainerName".equals(fieldName)) { + deserializedCustomerDataStorageProperties.blobContainerName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedCustomerDataStorageProperties; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/DiscoveredResource.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/DiscoveredResource.java new file mode 100644 index 000000000000..e99059bbc7a5 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/DiscoveredResource.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.chaos.fluent.models.DiscoveredResourceInner; + +/** + * An immutable client-side representation of DiscoveredResource. + */ +public interface DiscoveredResource { + /** + * 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 properties property: The properties of the discovered resource. + * + * @return the properties value. + */ + DiscoveredResourceProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner com.azure.resourcemanager.chaos.fluent.models.DiscoveredResourceInner object. + * + * @return the inner object. + */ + DiscoveredResourceInner innerModel(); +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/DiscoveredResourceProperties.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/DiscoveredResourceProperties.java new file mode 100644 index 000000000000..70f76b1b415e --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/DiscoveredResourceProperties.java @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; + +/** + * Model that represents the properties of a discovered resource. + */ +@Immutable +public final class DiscoveredResourceProperties implements JsonSerializable { + /* + * The namespace of the discovered resource. + */ + private String resourceNamespace; + + /* + * The name of the discovered resource. + */ + private String resourceName; + + /* + * The resource type of the discovered resource. + */ + private String resourceType; + + /* + * The fully qualified identifier of the discovered resource. + */ + private String fullyQualifiedIdentifier; + + /* + * The date and time when the resource was discovered. + */ + private OffsetDateTime discoveredAt; + + /* + * The scope of the discovered resource. + */ + private String scope; + + /** + * Creates an instance of DiscoveredResourceProperties class. + */ + private DiscoveredResourceProperties() { + } + + /** + * Get the resourceNamespace property: The namespace of the discovered resource. + * + * @return the resourceNamespace value. + */ + public String resourceNamespace() { + return this.resourceNamespace; + } + + /** + * Get the resourceName property: The name of the discovered resource. + * + * @return the resourceName value. + */ + public String resourceName() { + return this.resourceName; + } + + /** + * Get the resourceType property: The resource type of the discovered resource. + * + * @return the resourceType value. + */ + public String resourceType() { + return this.resourceType; + } + + /** + * Get the fullyQualifiedIdentifier property: The fully qualified identifier of the discovered resource. + * + * @return the fullyQualifiedIdentifier value. + */ + public String fullyQualifiedIdentifier() { + return this.fullyQualifiedIdentifier; + } + + /** + * Get the discoveredAt property: The date and time when the resource was discovered. + * + * @return the discoveredAt value. + */ + public OffsetDateTime discoveredAt() { + return this.discoveredAt; + } + + /** + * Get the scope property: The scope of the discovered resource. + * + * @return the scope value. + */ + public String scope() { + return this.scope; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DiscoveredResourceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DiscoveredResourceProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the DiscoveredResourceProperties. + */ + public static DiscoveredResourceProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DiscoveredResourceProperties deserializedDiscoveredResourceProperties = new DiscoveredResourceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("namespace".equals(fieldName)) { + deserializedDiscoveredResourceProperties.resourceNamespace = reader.getString(); + } else if ("resourceName".equals(fieldName)) { + deserializedDiscoveredResourceProperties.resourceName = reader.getString(); + } else if ("resourceType".equals(fieldName)) { + deserializedDiscoveredResourceProperties.resourceType = reader.getString(); + } else if ("fullyQualifiedIdentifier".equals(fieldName)) { + deserializedDiscoveredResourceProperties.fullyQualifiedIdentifier = reader.getString(); + } else if ("discoveredAt".equals(fieldName)) { + deserializedDiscoveredResourceProperties.discoveredAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("scope".equals(fieldName)) { + deserializedDiscoveredResourceProperties.scope = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDiscoveredResourceProperties; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/DiscoveredResources.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/DiscoveredResources.java new file mode 100644 index 000000000000..c1d43ad17392 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/DiscoveredResources.java @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of DiscoveredResources. + */ +public interface DiscoveredResources { + /** + * Get a discovered resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param discoveredResourceName Name of the discovered 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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a discovered resource along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String workspaceName, + String discoveredResourceName, Context context); + + /** + * Get a discovered resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param discoveredResourceName Name of the discovered resource. + * @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 discovered resource. + */ + DiscoveredResource get(String resourceGroupName, String workspaceName, String discoveredResourceName); + + /** + * Get a list of discovered resources for a workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace 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 discovered resources for a workspace as paginated response with {@link PagedIterable}. + */ + PagedIterable listByWorkspace(String resourceGroupName, String workspaceName); + + /** + * Get a list of discovered resources for a workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of discovered resources for a workspace as paginated response with {@link PagedIterable}. + */ + PagedIterable listByWorkspace(String resourceGroupName, String workspaceName, Context context); +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/EntraIdentity.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/EntraIdentity.java new file mode 100644 index 000000000000..5d05b5f4d8d1 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/EntraIdentity.java @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Model that represents the Azure Entra identity. + */ +@Immutable +public final class EntraIdentity implements JsonSerializable { + /* + * The identity object id. + */ + private String objectId; + + /* + * The identity tenant id. + */ + private String tenantId; + + /** + * Creates an instance of EntraIdentity class. + */ + private EntraIdentity() { + } + + /** + * Get the objectId property: The identity object id. + * + * @return the objectId value. + */ + public String objectId() { + return this.objectId; + } + + /** + * Get the tenantId property: The identity tenant id. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.tenantId; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EntraIdentity from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EntraIdentity if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the EntraIdentity. + */ + public static EntraIdentity fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EntraIdentity deserializedEntraIdentity = new EntraIdentity(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("objectId".equals(fieldName)) { + deserializedEntraIdentity.objectId = reader.getString(); + } else if ("tenantId".equals(fieldName)) { + deserializedEntraIdentity.tenantId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedEntraIdentity; + }); + } +} 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 e31c3a9fea67..bdc22a97ba0e 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 @@ -85,6 +85,14 @@ public interface Experiment { */ List selectors(); + /** + * Gets the customerDataStorage property: Optional customer-managed Storage account where Experiment schema will be + * stored. + * + * @return the customerDataStorage value. + */ + CustomerDataStorageProperties customerDataStorage(); + /** * Gets the region of the resource. * @@ -195,7 +203,8 @@ interface WithSelectors { * The stage of the Experiment definition which contains all the minimum required properties for the resource to * be created, but also allows for any other optional properties to be specified. */ - interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity { + interface WithCreate + extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, DefinitionStages.WithCustomerDataStorage { /** * Executes the create request. * @@ -237,6 +246,21 @@ interface WithIdentity { */ WithCreate withIdentity(ResourceIdentity identity); } + + /** + * The stage of the Experiment definition allowing to specify customerDataStorage. + */ + interface WithCustomerDataStorage { + /** + * Specifies the customerDataStorage property: Optional customer-managed Storage account where Experiment + * schema will be stored.. + * + * @param customerDataStorage Optional customer-managed Storage account where Experiment schema will be + * stored. + * @return the next definition stage. + */ + WithCreate withCustomerDataStorage(CustomerDataStorageProperties customerDataStorage); + } } /** 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 fbb6f6e28939..5616234fb92b 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 @@ -61,6 +61,13 @@ public interface ExperimentExecution { */ OffsetDateTime stoppedAt(); + /** + * Gets the provisioningState property: Resource provisioning state. Not currently in use for executions. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + /** * Gets the inner com.azure.resourcemanager.chaos.fluent.models.ExperimentExecutionInner object. * 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 ea8a8eb9d568..2901e6509b05 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 @@ -53,6 +53,13 @@ public interface ExperimentExecutionDetails { */ OffsetDateTime stoppedAt(); + /** + * Gets the provisioningState property: Resource provisioning state. Not currently in use for executions. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + /** * Gets the failureReason property: The reason why the execution failed. * diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ExternalResource.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ExternalResource.java new file mode 100644 index 000000000000..48fda487b40e --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ExternalResource.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Model that represents an external resource reference. + */ +@Fluent +public final class ExternalResource implements JsonSerializable { + /* + * The resource ID of the external resource. + */ + private String resourceId; + + /** + * Creates an instance of ExternalResource class. + */ + public ExternalResource() { + } + + /** + * Get the resourceId property: The resource ID of the external resource. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the resourceId property: The resource ID of the external resource. + * + * @param resourceId the resourceId value to set. + * @return the ExternalResource object itself. + */ + public ExternalResource withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("resourceId", this.resourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExternalResource from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExternalResource if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ExternalResource. + */ + public static ExternalResource fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExternalResource deserializedExternalResource = new ExternalResource(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resourceId".equals(fieldName)) { + deserializedExternalResource.resourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedExternalResource; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/FixResourcePermissionsRequest.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/FixResourcePermissionsRequest.java new file mode 100644 index 000000000000..bf7e5148e084 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/FixResourcePermissionsRequest.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Request body for fixing resource permissions. + */ +@Fluent +public final class FixResourcePermissionsRequest implements JsonSerializable { + /* + * Optional value that indicates whether to run a "dry run" of fixing resource permissions. + */ + private Boolean whatIf; + + /** + * Creates an instance of FixResourcePermissionsRequest class. + */ + public FixResourcePermissionsRequest() { + } + + /** + * Get the whatIf property: Optional value that indicates whether to run a "dry run" of fixing resource permissions. + * + * @return the whatIf value. + */ + public Boolean whatIf() { + return this.whatIf; + } + + /** + * Set the whatIf property: Optional value that indicates whether to run a "dry run" of fixing resource permissions. + * + * @param whatIf the whatIf value to set. + * @return the FixResourcePermissionsRequest object itself. + */ + public FixResourcePermissionsRequest withWhatIf(Boolean whatIf) { + this.whatIf = whatIf; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("whatIf", this.whatIf); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FixResourcePermissionsRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FixResourcePermissionsRequest if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the FixResourcePermissionsRequest. + */ + public static FixResourcePermissionsRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FixResourcePermissionsRequest deserializedFixResourcePermissionsRequest + = new FixResourcePermissionsRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("whatIf".equals(fieldName)) { + deserializedFixResourcePermissionsRequest.whatIf = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedFixResourcePermissionsRequest; + }); + } +} 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 4f5bf49c06ec..b630bbd3b664 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 @@ -12,7 +12,7 @@ import java.io.IOException; /** - * A map to describe the settings of an action. + * A map used to describe parameters for actions or configurations. */ @Fluent public final class KeyValuePair implements JsonSerializable { diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/OperationError.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/OperationError.java new file mode 100644 index 000000000000..3977cbae64dd --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/OperationError.java @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Represents a system or infrastructure error encountered during an async operation. + */ +@Immutable +public final class OperationError implements JsonSerializable { + /* + * The error code identifying the type of system error. + */ + private String errorCode; + + /* + * A human-readable description of the system error. + */ + private String errorMessage; + + /** + * Creates an instance of OperationError class. + */ + private OperationError() { + } + + /** + * Get the errorCode property: The error code identifying the type of system error. + * + * @return the errorCode value. + */ + public String errorCode() { + return this.errorCode; + } + + /** + * Get the errorMessage property: A human-readable description of the system error. + * + * @return the errorMessage value. + */ + public String errorMessage() { + return this.errorMessage; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("errorCode", this.errorCode); + jsonWriter.writeStringField("errorMessage", this.errorMessage); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationError from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationError if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the OperationError. + */ + public static OperationError fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationError deserializedOperationError = new OperationError(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("errorCode".equals(fieldName)) { + deserializedOperationError.errorCode = reader.getString(); + } else if ("errorMessage".equals(fieldName)) { + deserializedOperationError.errorMessage = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedOperationError; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ParameterType.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ParameterType.java new file mode 100644 index 000000000000..38c2c20d53b5 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ParameterType.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Enum for parameter types. + */ +public final class ParameterType extends ExpandableStringEnum { + /** + * String parameter type. + */ + public static final ParameterType STRING = fromString("string"); + + /** + * Number parameter type. + */ + public static final ParameterType NUMBER = fromString("number"); + + /** + * Boolean parameter type. + */ + public static final ParameterType BOOLEAN = fromString("boolean"); + + /** + * Object parameter type. + */ + public static final ParameterType OBJECT = fromString("object"); + + /** + * Array parameter type. + */ + public static final ParameterType ARRAY = fromString("array"); + + /** + * Creates a new instance of ParameterType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ParameterType() { + } + + /** + * Creates or finds a ParameterType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ParameterType. + */ + public static ParameterType fromString(String name) { + return fromString(name, ParameterType.class); + } + + /** + * Gets known ParameterType values. + * + * @return known ParameterType values. + */ + public static Collection values() { + return values(ParameterType.class); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PermissionError.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PermissionError.java new file mode 100644 index 000000000000..00a489470c3f --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PermissionError.java @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Model that represents the permission error. + */ +@Immutable +public final class PermissionError implements JsonSerializable { + /* + * The resource id for the affected resource. + */ + private String resourceId; + + /* + * The missing permissions. + */ + private List missingPermissions; + + /* + * The required permissions. + */ + private List requiredPermissions; + + /* + * The recommended roles. + */ + private List recommendedRoles; + + /* + * The identity. + */ + private EntraIdentity identity; + + /** + * Creates an instance of PermissionError class. + */ + private PermissionError() { + } + + /** + * Get the resourceId property: The resource id for the affected resource. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Get the missingPermissions property: The missing permissions. + * + * @return the missingPermissions value. + */ + public List missingPermissions() { + return this.missingPermissions; + } + + /** + * Get the requiredPermissions property: The required permissions. + * + * @return the requiredPermissions value. + */ + public List requiredPermissions() { + return this.requiredPermissions; + } + + /** + * Get the recommendedRoles property: The recommended roles. + * + * @return the recommendedRoles value. + */ + public List recommendedRoles() { + return this.recommendedRoles; + } + + /** + * Get the identity property: The identity. + * + * @return the identity value. + */ + public EntraIdentity identity() { + return this.identity; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PermissionError from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PermissionError if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PermissionError. + */ + public static PermissionError fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PermissionError deserializedPermissionError = new PermissionError(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resourceId".equals(fieldName)) { + deserializedPermissionError.resourceId = reader.getString(); + } else if ("missingPermissions".equals(fieldName)) { + List missingPermissions = reader.readArray(reader1 -> reader1.getString()); + deserializedPermissionError.missingPermissions = missingPermissions; + } else if ("requiredPermissions".equals(fieldName)) { + List requiredPermissions = reader.readArray(reader1 -> reader1.getString()); + deserializedPermissionError.requiredPermissions = requiredPermissions; + } else if ("recommendedRoles".equals(fieldName)) { + List recommendedRoles = reader.readArray(reader1 -> reader1.getString()); + deserializedPermissionError.recommendedRoles = recommendedRoles; + } else if ("identity".equals(fieldName)) { + deserializedPermissionError.identity = EntraIdentity.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPermissionError; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PermissionsFix.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PermissionsFix.java new file mode 100644 index 000000000000..61fa09be772d --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PermissionsFix.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Model that represents the fix resource permissions result. + */ +@Immutable +public final class PermissionsFix extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + private PermissionsFixProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of PermissionsFix class. + */ + private PermissionsFix() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public PermissionsFixProperties properties() { + return this.properties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PermissionsFix from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PermissionsFix if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PermissionsFix. + */ + public static PermissionsFix fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PermissionsFix deserializedPermissionsFix = new PermissionsFix(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedPermissionsFix.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedPermissionsFix.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedPermissionsFix.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedPermissionsFix.properties = PermissionsFixProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedPermissionsFix.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPermissionsFix; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PermissionsFixProperties.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PermissionsFixProperties.java new file mode 100644 index 000000000000..afefb0df0df6 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PermissionsFixProperties.java @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * Model that represents the properties of the permission fix operation. + */ +@Immutable +public final class PermissionsFixProperties implements JsonSerializable { + /* + * The permission fix state. + */ + private PermissionsFixState state; + + /* + * The permission fix UTC start time. + */ + private OffsetDateTime startedAt; + + /* + * The permission fix UTC end time. + */ + private OffsetDateTime completedAt; + + /* + * Whether this was a what-if (dry run) operation. + */ + private boolean whatIfMode; + + /* + * The list of role assignment results. + */ + private List roleAssignments; + + /* + * Summary of the permission fix operation. + */ + private PermissionsFixSummary summary; + + /** + * Creates an instance of PermissionsFixProperties class. + */ + private PermissionsFixProperties() { + } + + /** + * Get the state property: The permission fix state. + * + * @return the state value. + */ + public PermissionsFixState state() { + return this.state; + } + + /** + * Get the startedAt property: The permission fix UTC start time. + * + * @return the startedAt value. + */ + public OffsetDateTime startedAt() { + return this.startedAt; + } + + /** + * Get the completedAt property: The permission fix UTC end time. + * + * @return the completedAt value. + */ + public OffsetDateTime completedAt() { + return this.completedAt; + } + + /** + * Get the whatIfMode property: Whether this was a what-if (dry run) operation. + * + * @return the whatIfMode value. + */ + public boolean whatIfMode() { + return this.whatIfMode; + } + + /** + * Get the roleAssignments property: The list of role assignment results. + * + * @return the roleAssignments value. + */ + public List roleAssignments() { + return this.roleAssignments; + } + + /** + * Get the summary property: Summary of the permission fix operation. + * + * @return the summary value. + */ + public PermissionsFixSummary summary() { + return this.summary; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PermissionsFixProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PermissionsFixProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PermissionsFixProperties. + */ + public static PermissionsFixProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PermissionsFixProperties deserializedPermissionsFixProperties = new PermissionsFixProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("state".equals(fieldName)) { + deserializedPermissionsFixProperties.state = PermissionsFixState.fromString(reader.getString()); + } else if ("startedAt".equals(fieldName)) { + deserializedPermissionsFixProperties.startedAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("whatIfMode".equals(fieldName)) { + deserializedPermissionsFixProperties.whatIfMode = reader.getBoolean(); + } else if ("roleAssignments".equals(fieldName)) { + List roleAssignments + = reader.readArray(reader1 -> RoleAssignmentResult.fromJson(reader1)); + deserializedPermissionsFixProperties.roleAssignments = roleAssignments; + } else if ("summary".equals(fieldName)) { + deserializedPermissionsFixProperties.summary = PermissionsFixSummary.fromJson(reader); + } else if ("completedAt".equals(fieldName)) { + deserializedPermissionsFixProperties.completedAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedPermissionsFixProperties; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PermissionsFixState.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PermissionsFixState.java new file mode 100644 index 000000000000..05af1e99214e --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PermissionsFixState.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Enum of the permission fix state. + */ +public final class PermissionsFixState extends ExpandableStringEnum { + /** + * The permission fix has not started. + */ + public static final PermissionsFixState NOT_STARTED = fromString("NotStarted"); + + /** + * The permission fix is in progress. + */ + public static final PermissionsFixState IN_PROGRESS = fromString("InProgress"); + + /** + * All role assignments succeeded. + */ + public static final PermissionsFixState SUCCEEDED = fromString("Succeeded"); + + /** + * All role assignments failed. + */ + public static final PermissionsFixState FAILED = fromString("Failed"); + + /** + * Some role assignments succeeded and some failed. + */ + public static final PermissionsFixState PARTIALLY_SUCCEEDED = fromString("PartiallySucceeded"); + + /** + * What-if analysis completed (no changes made). + */ + public static final PermissionsFixState WHAT_IF_COMPLETED = fromString("WhatIfCompleted"); + + /** + * Creates a new instance of PermissionsFixState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PermissionsFixState() { + } + + /** + * Creates or finds a PermissionsFixState from its string representation. + * + * @param name a name to look for. + * @return the corresponding PermissionsFixState. + */ + public static PermissionsFixState fromString(String name) { + return fromString(name, PermissionsFixState.class); + } + + /** + * Gets known PermissionsFixState values. + * + * @return known PermissionsFixState values. + */ + public static Collection values() { + return values(PermissionsFixState.class); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PermissionsFixSummary.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PermissionsFixSummary.java new file mode 100644 index 000000000000..c3567fbe9490 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PermissionsFixSummary.java @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Summary of the permission fix operation. + */ +@Immutable +public final class PermissionsFixSummary implements JsonSerializable { + /* + * Total number of role assignments required. + */ + private int totalRequired; + + /* + * Number of successful role assignments. + */ + private int succeeded; + + /* + * Number of failed role assignments. + */ + private int failed; + + /* + * Number of skipped role assignments (already existed). + */ + private int skipped; + + /** + * Creates an instance of PermissionsFixSummary class. + */ + private PermissionsFixSummary() { + } + + /** + * Get the totalRequired property: Total number of role assignments required. + * + * @return the totalRequired value. + */ + public int totalRequired() { + return this.totalRequired; + } + + /** + * Get the succeeded property: Number of successful role assignments. + * + * @return the succeeded value. + */ + public int succeeded() { + return this.succeeded; + } + + /** + * Get the failed property: Number of failed role assignments. + * + * @return the failed value. + */ + public int failed() { + return this.failed; + } + + /** + * Get the skipped property: Number of skipped role assignments (already existed). + * + * @return the skipped value. + */ + public int skipped() { + return this.skipped; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PermissionsFixSummary from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PermissionsFixSummary if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PermissionsFixSummary. + */ + public static PermissionsFixSummary fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PermissionsFixSummary deserializedPermissionsFixSummary = new PermissionsFixSummary(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("totalRequired".equals(fieldName)) { + deserializedPermissionsFixSummary.totalRequired = reader.getInt(); + } else if ("succeeded".equals(fieldName)) { + deserializedPermissionsFixSummary.succeeded = reader.getInt(); + } else if ("failed".equals(fieldName)) { + deserializedPermissionsFixSummary.failed = reader.getInt(); + } else if ("skipped".equals(fieldName)) { + deserializedPermissionsFixSummary.skipped = reader.getInt(); + } else { + reader.skipChildren(); + } + } + + return deserializedPermissionsFixSummary; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PhysicalToLogicalZoneMapping.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PhysicalToLogicalZoneMapping.java new file mode 100644 index 000000000000..f097b31ae1d6 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PhysicalToLogicalZoneMapping.java @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Maps a physical zone to the resolved logical zone for a given subscription. + */ +@Immutable +public final class PhysicalToLogicalZoneMapping implements JsonSerializable { + /* + * The physical availability zone (e.g., `"westus2-az1"`). + */ + private String physicalZone; + + /* + * The logical availability zone resolved for this subscription + * (e.g., `"1"`, `"2"`, `"3"`). + */ + private String logicalZone; + + /** + * Creates an instance of PhysicalToLogicalZoneMapping class. + */ + private PhysicalToLogicalZoneMapping() { + } + + /** + * Get the physicalZone property: The physical availability zone (e.g., `"westus2-az1"`). + * + * @return the physicalZone value. + */ + public String physicalZone() { + return this.physicalZone; + } + + /** + * Get the logicalZone property: The logical availability zone resolved for this subscription + * (e.g., `"1"`, `"2"`, `"3"`). + * + * @return the logicalZone value. + */ + public String logicalZone() { + return this.logicalZone; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PhysicalToLogicalZoneMapping from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PhysicalToLogicalZoneMapping if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PhysicalToLogicalZoneMapping. + */ + public static PhysicalToLogicalZoneMapping fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PhysicalToLogicalZoneMapping deserializedPhysicalToLogicalZoneMapping = new PhysicalToLogicalZoneMapping(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("physicalZone".equals(fieldName)) { + deserializedPhysicalToLogicalZoneMapping.physicalZone = reader.getString(); + } else if ("logicalZone".equals(fieldName)) { + deserializedPhysicalToLogicalZoneMapping.logicalZone = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPhysicalToLogicalZoneMapping; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateAccess.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateAccess.java new file mode 100644 index 000000000000..2c5a134340e7 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateAccess.java @@ -0,0 +1,252 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.chaos.fluent.models.PrivateAccessInner; +import java.util.Map; + +/** + * An immutable client-side representation of PrivateAccess. + */ +public interface PrivateAccess { + /** + * 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 properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + PrivateAccessProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * 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.PrivateAccessInner object. + * + * @return the inner object. + */ + PrivateAccessInner innerModel(); + + /** + * The entirety of the PrivateAccess definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithProperties, DefinitionStages.WithCreate { + } + + /** + * The PrivateAccess definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the PrivateAccess definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the PrivateAccess 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. + */ + WithResourceGroup withRegion(Region location); + + /** + * 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 PrivateAccess definition allowing to specify parent resource. + */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the next definition stage. + */ + WithProperties withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the PrivateAccess definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + WithCreate withProperties(PrivateAccessProperties properties); + } + + /** + * The stage of the PrivateAccess definition which contains all the minimum required properties for the resource + * to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithTags { + /** + * Executes the create request. + * + * @return the created resource. + */ + PrivateAccess create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + PrivateAccess create(Context context); + } + + /** + * The stage of the PrivateAccess 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); + } + } + + /** + * Begins update for the PrivateAccess resource. + * + * @return the stage of resource update. + */ + PrivateAccess.Update update(); + + /** + * The template for PrivateAccess update. + */ + interface Update extends UpdateStages.WithTags { + /** + * Executes the update request. + * + * @return the updated resource. + */ + PrivateAccess apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + PrivateAccess apply(Context context); + } + + /** + * The PrivateAccess update stages. + */ + interface UpdateStages { + /** + * The stage of the PrivateAccess update allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + PrivateAccess refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + PrivateAccess refresh(Context context); +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateAccessPatch.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateAccessPatch.java new file mode 100644 index 000000000000..5f276ae530ec --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateAccessPatch.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * Describes a private access update. + */ +@Fluent +public final class PrivateAccessPatch implements JsonSerializable { + /* + * Resource tags. + */ + private Map tags; + + /** + * Creates an instance of PrivateAccessPatch class. + */ + public PrivateAccessPatch() { + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the PrivateAccessPatch object itself. + */ + public PrivateAccessPatch withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateAccessPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateAccessPatch if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the PrivateAccessPatch. + */ + public static PrivateAccessPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateAccessPatch deserializedPrivateAccessPatch = new PrivateAccessPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedPrivateAccessPatch.tags = tags; + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateAccessPatch; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateAccessProperties.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateAccessProperties.java new file mode 100644 index 000000000000..5570e2e36e44 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateAccessProperties.java @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.chaos.fluent.models.PrivateEndpointConnectionInner; +import java.io.IOException; +import java.util.List; + +/** + * The properties of a private access resource. + */ +@Fluent +public final class PrivateAccessProperties implements JsonSerializable { + /* + * Most recent provisioning state for the given privateAccess resource. + */ + private ProvisioningState provisioningState; + + /* + * A readonly collection of private endpoint connection. Currently only one endpoint connection is supported. + */ + private List privateEndpointConnections; + + /* + * Public Network Access Control for PrivateAccess resource. + */ + private PublicNetworkAccessOption publicNetworkAccess; + + /** + * Creates an instance of PrivateAccessProperties class. + */ + public PrivateAccessProperties() { + } + + /** + * Get the provisioningState property: Most recent provisioning state for the given privateAccess resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the privateEndpointConnections property: A readonly collection of private endpoint connection. Currently only + * one endpoint connection is supported. + * + * @return the privateEndpointConnections value. + */ + public List privateEndpointConnections() { + return this.privateEndpointConnections; + } + + /** + * Get the publicNetworkAccess property: Public Network Access Control for PrivateAccess resource. + * + * @return the publicNetworkAccess value. + */ + public PublicNetworkAccessOption publicNetworkAccess() { + return this.publicNetworkAccess; + } + + /** + * Set the publicNetworkAccess property: Public Network Access Control for PrivateAccess resource. + * + * @param publicNetworkAccess the publicNetworkAccess value to set. + * @return the PrivateAccessProperties object itself. + */ + public PrivateAccessProperties withPublicNetworkAccess(PublicNetworkAccessOption publicNetworkAccess) { + this.publicNetworkAccess = publicNetworkAccess; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("publicNetworkAccess", + this.publicNetworkAccess == null ? null : this.publicNetworkAccess.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateAccessProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateAccessProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the PrivateAccessProperties. + */ + public static PrivateAccessProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateAccessProperties deserializedPrivateAccessProperties = new PrivateAccessProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedPrivateAccessProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("privateEndpointConnections".equals(fieldName)) { + List privateEndpointConnections + = reader.readArray(reader1 -> PrivateEndpointConnectionInner.fromJson(reader1)); + deserializedPrivateAccessProperties.privateEndpointConnections = privateEndpointConnections; + } else if ("publicNetworkAccess".equals(fieldName)) { + deserializedPrivateAccessProperties.publicNetworkAccess + = PublicNetworkAccessOption.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateAccessProperties; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateAccesses.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateAccesses.java new file mode 100644 index 000000000000..3d8d413ba085 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateAccesses.java @@ -0,0 +1,283 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of PrivateAccesses. + */ +public interface PrivateAccesses { + /** + * Get a private access resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private access resource along with {@link Response}. + */ + Response getByResourceGroupWithResponse(String resourceGroupName, String privateAccessName, + Context context); + + /** + * Get a private access resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @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 private access resource. + */ + PrivateAccess getByResourceGroup(String resourceGroupName, String privateAccessName); + + /** + * Delete a private access. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @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. + */ + void deleteByResourceGroup(String resourceGroupName, String privateAccessName); + + /** + * Delete a private access. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String privateAccessName, Context context); + + /** + * Get a list of private access resources in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private access resources in a resource group as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Get a list of private access resources in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param continuationToken String that sets the continuation token. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private access resources in a resource group as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, String continuationToken, + Context context); + + /** + * Get a list of private access 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 private access resources in a subscription as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * Get a list of private access resources in a subscription. + * + * @param continuationToken String that sets the continuation token. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private access resources in a subscription as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String continuationToken, Context context); + + /** + * Gets the private link resources possible under private access resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the private link resources possible under private access resource along with {@link Response}. + */ + Response getPrivateLinkResourcesWithResponse(String resourceGroupName, + String privateAccessName, Context context); + + /** + * Gets the private link resources possible under private access resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the private link resources possible under private access resource. + */ + PrivateLinkResourceListResult getPrivateLinkResources(String resourceGroupName, String privateAccessName); + + /** + * Gets information about a private endpoint connection under a private access resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a private endpoint connection under a private access resource along with + * {@link Response}. + */ + Response getAPrivateEndpointConnectionWithResponse(String resourceGroupName, + String privateAccessName, String privateEndpointConnectionName, Context context); + + /** + * Gets information about a private endpoint connection under a private access resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @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 information about a private endpoint connection under a private access resource. + */ + PrivateEndpointConnection getAPrivateEndpointConnection(String resourceGroupName, String privateAccessName, + String privateEndpointConnectionName); + + /** + * Deletes a private endpoint connection under a private access resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @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. + */ + void deleteAPrivateEndpointConnection(String resourceGroupName, String privateAccessName, + String privateEndpointConnectionName); + + /** + * Deletes a private endpoint connection under a private access resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteAPrivateEndpointConnection(String resourceGroupName, String privateAccessName, + String privateEndpointConnectionName, Context context); + + /** + * List information about private endpoint connections under a private access resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @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 private link resources as paginated response with {@link PagedIterable}. + */ + PagedIterable listPrivateEndpointConnections(String resourceGroupName, + String privateAccessName); + + /** + * List information about private endpoint connections under a private access resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateAccessName The name of the private access resource that is being created. Supported characters for + * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources as paginated response with {@link PagedIterable}. + */ + PagedIterable listPrivateEndpointConnections(String resourceGroupName, + String privateAccessName, Context context); + + /** + * Get a private access 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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private access resource along with {@link Response}. + */ + PrivateAccess getById(String id); + + /** + * Get a private access resource. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private access resource along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a private access. + * + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete a private access. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new PrivateAccess resource. + * + * @param name resource name. + * @return the first stage of the new PrivateAccess definition. + */ + PrivateAccess.DefinitionStages.Blank define(String name); +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateEndpoint.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateEndpoint.java new file mode 100644 index 000000000000..2064113b8217 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateEndpoint.java @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The private endpoint resource. + */ +@Immutable +public final class PrivateEndpoint implements JsonSerializable { + /* + * The Azure identifier for private endpoint. + */ + private String id; + + /** + * Creates an instance of PrivateEndpoint class. + */ + private PrivateEndpoint() { + } + + /** + * Get the id property: The Azure identifier for private endpoint. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateEndpoint from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateEndpoint if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the PrivateEndpoint. + */ + public static PrivateEndpoint fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateEndpoint deserializedPrivateEndpoint = new PrivateEndpoint(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedPrivateEndpoint.id = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateEndpoint; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateEndpointConnection.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateEndpointConnection.java new file mode 100644 index 000000000000..57f12642dd3b --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateEndpointConnection.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.chaos.fluent.models.PrivateEndpointConnectionInner; + +/** + * An immutable client-side representation of PrivateEndpointConnection. + */ +public interface PrivateEndpointConnection { + /** + * 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 properties property: Resource properties. + * + * @return the properties value. + */ + PrivateEndpointConnectionProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner com.azure.resourcemanager.chaos.fluent.models.PrivateEndpointConnectionInner object. + * + * @return the inner object. + */ + PrivateEndpointConnectionInner innerModel(); +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateEndpointConnectionProperties.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateEndpointConnectionProperties.java new file mode 100644 index 000000000000..483b2851f36e --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateEndpointConnectionProperties.java @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Properties of the private endpoint connection. + */ +@Immutable +public final class PrivateEndpointConnectionProperties + implements JsonSerializable { + /* + * The group ids for the private endpoint resource. + */ + private List groupIds; + + /* + * The private endpoint resource. + */ + private PrivateEndpoint privateEndpoint; + + /* + * A collection of information about the state of the connection between service consumer and provider. + */ + private PrivateLinkServiceConnectionState privateLinkServiceConnectionState; + + /* + * The provisioning state of the private endpoint connection resource. + */ + private ProvisioningState provisioningState; + + /** + * Creates an instance of PrivateEndpointConnectionProperties class. + */ + private PrivateEndpointConnectionProperties() { + } + + /** + * Get the groupIds property: The group ids for the private endpoint resource. + * + * @return the groupIds value. + */ + public List groupIds() { + return this.groupIds; + } + + /** + * Get the privateEndpoint property: The private endpoint resource. + * + * @return the privateEndpoint value. + */ + public PrivateEndpoint privateEndpoint() { + return this.privateEndpoint; + } + + /** + * Get the privateLinkServiceConnectionState property: A collection of information about the state of the connection + * between service consumer and provider. + * + * @return the privateLinkServiceConnectionState value. + */ + public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { + return this.privateLinkServiceConnectionState; + } + + /** + * Get the provisioningState property: The provisioning state of the private endpoint connection resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("privateLinkServiceConnectionState", this.privateLinkServiceConnectionState); + jsonWriter.writeJsonField("privateEndpoint", this.privateEndpoint); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateEndpointConnectionProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateEndpointConnectionProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PrivateEndpointConnectionProperties. + */ + public static PrivateEndpointConnectionProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateEndpointConnectionProperties deserializedPrivateEndpointConnectionProperties + = new PrivateEndpointConnectionProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("privateLinkServiceConnectionState".equals(fieldName)) { + deserializedPrivateEndpointConnectionProperties.privateLinkServiceConnectionState + = PrivateLinkServiceConnectionState.fromJson(reader); + } else if ("groupIds".equals(fieldName)) { + List groupIds = reader.readArray(reader1 -> reader1.getString()); + deserializedPrivateEndpointConnectionProperties.groupIds = groupIds; + } else if ("privateEndpoint".equals(fieldName)) { + deserializedPrivateEndpointConnectionProperties.privateEndpoint = PrivateEndpoint.fromJson(reader); + } else if ("provisioningState".equals(fieldName)) { + deserializedPrivateEndpointConnectionProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateEndpointConnectionProperties; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateEndpointServiceConnectionStatus.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateEndpointServiceConnectionStatus.java new file mode 100644 index 000000000000..83020d5017f2 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateEndpointServiceConnectionStatus.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The private endpoint connection status. + */ +public final class PrivateEndpointServiceConnectionStatus + extends ExpandableStringEnum { + /** + * Pending status. + */ + public static final PrivateEndpointServiceConnectionStatus PENDING = fromString("Pending"); + + /** + * Approved status. + */ + public static final PrivateEndpointServiceConnectionStatus APPROVED = fromString("Approved"); + + /** + * Rejected status. + */ + public static final PrivateEndpointServiceConnectionStatus REJECTED = fromString("Rejected"); + + /** + * Creates a new instance of PrivateEndpointServiceConnectionStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PrivateEndpointServiceConnectionStatus() { + } + + /** + * Creates or finds a PrivateEndpointServiceConnectionStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding PrivateEndpointServiceConnectionStatus. + */ + public static PrivateEndpointServiceConnectionStatus fromString(String name) { + return fromString(name, PrivateEndpointServiceConnectionStatus.class); + } + + /** + * Gets known PrivateEndpointServiceConnectionStatus values. + * + * @return known PrivateEndpointServiceConnectionStatus values. + */ + public static Collection values() { + return values(PrivateEndpointServiceConnectionStatus.class); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateLinkResource.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateLinkResource.java new file mode 100644 index 000000000000..c8565fcac0f2 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateLinkResource.java @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * A private link resource. + */ +@Immutable +public final class PrivateLinkResource extends Resource { + /* + * The resource-specific properties for this resource. + */ + private PrivateLinkResourceProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of PrivateLinkResource class. + */ + private PrivateLinkResource() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public PrivateLinkResourceProperties properties() { + return this.properties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateLinkResource from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateLinkResource if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PrivateLinkResource. + */ + public static PrivateLinkResource fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateLinkResource deserializedPrivateLinkResource = new PrivateLinkResource(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedPrivateLinkResource.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedPrivateLinkResource.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedPrivateLinkResource.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedPrivateLinkResource.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedPrivateLinkResource.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedPrivateLinkResource.properties = PrivateLinkResourceProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedPrivateLinkResource.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateLinkResource; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateLinkResourceListResult.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateLinkResourceListResult.java new file mode 100644 index 000000000000..68322a0971e4 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateLinkResourceListResult.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.resourcemanager.chaos.fluent.models.PrivateLinkResourceListResultInner; +import java.util.List; + +/** + * An immutable client-side representation of PrivateLinkResourceListResult. + */ +public interface PrivateLinkResourceListResult { + /** + * Gets the value property: The PrivateLinkResource items on this page. + * + * @return the value value. + */ + List value(); + + /** + * Gets the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + String nextLink(); + + /** + * Gets the inner com.azure.resourcemanager.chaos.fluent.models.PrivateLinkResourceListResultInner object. + * + * @return the inner object. + */ + PrivateLinkResourceListResultInner innerModel(); +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateLinkResourceProperties.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateLinkResourceProperties.java new file mode 100644 index 000000000000..dae75594a1b8 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateLinkResourceProperties.java @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Properties of a private link resource. + */ +@Immutable +public final class PrivateLinkResourceProperties implements JsonSerializable { + /* + * The private link resource group id. + */ + private String groupId; + + /* + * The private link resource required member names. + */ + private List requiredMembers; + + /* + * The private link resource private link DNS zone name. + */ + private List requiredZoneNames; + + /* + * Resource provisioning state. Not currently in use. + */ + private ProvisioningState provisioningState; + + /** + * Creates an instance of PrivateLinkResourceProperties class. + */ + private PrivateLinkResourceProperties() { + } + + /** + * Get the groupId property: The private link resource group id. + * + * @return the groupId value. + */ + public String groupId() { + return this.groupId; + } + + /** + * Get the requiredMembers property: The private link resource required member names. + * + * @return the requiredMembers value. + */ + public List requiredMembers() { + return this.requiredMembers; + } + + /** + * Get the requiredZoneNames property: The private link resource private link DNS zone name. + * + * @return the requiredZoneNames value. + */ + public List requiredZoneNames() { + return this.requiredZoneNames; + } + + /** + * Get the provisioningState property: Resource provisioning state. Not currently in use. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("requiredZoneNames", this.requiredZoneNames, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateLinkResourceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateLinkResourceProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the PrivateLinkResourceProperties. + */ + public static PrivateLinkResourceProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateLinkResourceProperties deserializedPrivateLinkResourceProperties + = new PrivateLinkResourceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("groupId".equals(fieldName)) { + deserializedPrivateLinkResourceProperties.groupId = reader.getString(); + } else if ("requiredMembers".equals(fieldName)) { + List requiredMembers = reader.readArray(reader1 -> reader1.getString()); + deserializedPrivateLinkResourceProperties.requiredMembers = requiredMembers; + } else if ("requiredZoneNames".equals(fieldName)) { + List requiredZoneNames = reader.readArray(reader1 -> reader1.getString()); + deserializedPrivateLinkResourceProperties.requiredZoneNames = requiredZoneNames; + } else if ("provisioningState".equals(fieldName)) { + deserializedPrivateLinkResourceProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateLinkResourceProperties; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateLinkServiceConnectionState.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateLinkServiceConnectionState.java new file mode 100644 index 000000000000..8e468a62c3f3 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateLinkServiceConnectionState.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * A collection of information about the state of the connection between service consumer and provider. + */ +@Immutable +public final class PrivateLinkServiceConnectionState implements JsonSerializable { + /* + * Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. + */ + private PrivateEndpointServiceConnectionStatus status; + + /* + * The reason for approval/rejection of the connection. + */ + private String description; + + /* + * A message indicating if changes on the service provider require any updates on the consumer. + */ + private String actionsRequired; + + /** + * Creates an instance of PrivateLinkServiceConnectionState class. + */ + private PrivateLinkServiceConnectionState() { + } + + /** + * Get the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the + * service. + * + * @return the status value. + */ + public PrivateEndpointServiceConnectionStatus status() { + return this.status; + } + + /** + * Get the description property: The reason for approval/rejection of the connection. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Get the actionsRequired property: A message indicating if changes on the service provider require any updates on + * the consumer. + * + * @return the actionsRequired value. + */ + public String actionsRequired() { + return this.actionsRequired; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); + jsonWriter.writeStringField("description", this.description); + jsonWriter.writeStringField("actionsRequired", this.actionsRequired); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateLinkServiceConnectionState from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateLinkServiceConnectionState if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the PrivateLinkServiceConnectionState. + */ + public static PrivateLinkServiceConnectionState fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateLinkServiceConnectionState deserializedPrivateLinkServiceConnectionState + = new PrivateLinkServiceConnectionState(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedPrivateLinkServiceConnectionState.status + = PrivateEndpointServiceConnectionStatus.fromString(reader.getString()); + } else if ("description".equals(fieldName)) { + deserializedPrivateLinkServiceConnectionState.description = reader.getString(); + } else if ("actionsRequired".equals(fieldName)) { + deserializedPrivateLinkServiceConnectionState.actionsRequired = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateLinkServiceConnectionState; + }); + } +} 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 099f09cdad9a..0017f1b012e0 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 @@ -41,6 +41,11 @@ public final class ProvisioningState extends ExpandableStringEnum { + /** + * Enabled access. + */ + public static final PublicNetworkAccessOption ENABLED = fromString("Enabled"); + + /** + * Disabled access. + */ + public static final PublicNetworkAccessOption DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of PublicNetworkAccessOption value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PublicNetworkAccessOption() { + } + + /** + * Creates or finds a PublicNetworkAccessOption from its string representation. + * + * @param name a name to look for. + * @return the corresponding PublicNetworkAccessOption. + */ + public static PublicNetworkAccessOption fromString(String name) { + return fromString(name, PublicNetworkAccessOption.class); + } + + /** + * Gets known PublicNetworkAccessOption values. + * + * @return known PublicNetworkAccessOption values. + */ + public static Collection values() { + return values(PublicNetworkAccessOption.class); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Recommendation.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Recommendation.java new file mode 100644 index 000000000000..467b4efc6b1e --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Recommendation.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; + +/** + * Model that represents a scenario recommendation. + */ +@Immutable +public final class Recommendation implements JsonSerializable { + /* + * The recommendation status. + */ + private RecommendationStatus recommendationStatus; + + /* + * The UTC time when the recommendation was evaluated. + */ + private OffsetDateTime evaluationRunAt; + + /** + * Creates an instance of Recommendation class. + */ + private Recommendation() { + } + + /** + * Get the recommendationStatus property: The recommendation status. + * + * @return the recommendationStatus value. + */ + public RecommendationStatus recommendationStatus() { + return this.recommendationStatus; + } + + /** + * Get the evaluationRunAt property: The UTC time when the recommendation was evaluated. + * + * @return the evaluationRunAt value. + */ + public OffsetDateTime evaluationRunAt() { + return this.evaluationRunAt; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Recommendation from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Recommendation if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the Recommendation. + */ + public static Recommendation fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Recommendation deserializedRecommendation = new Recommendation(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("recommendationStatus".equals(fieldName)) { + deserializedRecommendation.recommendationStatus + = RecommendationStatus.fromString(reader.getString()); + } else if ("evaluationRunAt".equals(fieldName)) { + deserializedRecommendation.evaluationRunAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedRecommendation; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/RecommendationStatus.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/RecommendationStatus.java new file mode 100644 index 000000000000..d33e6603b653 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/RecommendationStatus.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Enum of the scenario validation state. + */ +public final class RecommendationStatus extends ExpandableStringEnum { + /** + * The scenario recommendation status has not been evaluated. + */ + public static final RecommendationStatus NOT_EVALUATED = fromString("NotEvaluated"); + + /** + * The scenario recommendation status is recommended. + */ + public static final RecommendationStatus RECOMMENDED = fromString("Recommended"); + + /** + * The scenario recommendation status is not applicable. + */ + public static final RecommendationStatus NOT_APPLICABLE = fromString("NotApplicable"); + + /** + * The scenario recommendation status is currently being evaluated. + */ + public static final RecommendationStatus EVALUATING = fromString("Evaluating"); + + /** + * The scenario recommendation evaluation has failed. + */ + public static final RecommendationStatus EVALUATION_FAILED = fromString("EvaluationFailed"); + + /** + * The scenario recommendation evaluation was cancelled. + */ + public static final RecommendationStatus EVALUATION_CANCELLED = fromString("EvaluationCancelled"); + + /** + * Creates a new instance of RecommendationStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RecommendationStatus() { + } + + /** + * Creates or finds a RecommendationStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding RecommendationStatus. + */ + public static RecommendationStatus fromString(String name) { + return fromString(name, RecommendationStatus.class); + } + + /** + * Gets known RecommendationStatus values. + * + * @return known RecommendationStatus values. + */ + public static Collection values() { + return values(RecommendationStatus.class); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ResourceStateError.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ResourceStateError.java new file mode 100644 index 000000000000..8be4c89afad0 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ResourceStateError.java @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Model that represents the resource state error. + */ +@Immutable +public final class ResourceStateError implements JsonSerializable { + /* + * The resource id for the affected resource. + */ + private String resourceId; + + /* + * The error code. + */ + private int errorCode; + + /* + * The error message. + */ + private String errorMessage; + + /* + * The remediation uri. + */ + private String remediationUri; + + /** + * Creates an instance of ResourceStateError class. + */ + private ResourceStateError() { + } + + /** + * Get the resourceId property: The resource id for the affected resource. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Get the errorCode property: The error code. + * + * @return the errorCode value. + */ + public int errorCode() { + return this.errorCode; + } + + /** + * Get the errorMessage property: The error message. + * + * @return the errorMessage value. + */ + public String errorMessage() { + return this.errorMessage; + } + + /** + * Get the remediationUri property: The remediation uri. + * + * @return the remediationUri value. + */ + public String remediationUri() { + return this.remediationUri; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceStateError from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceStateError if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ResourceStateError. + */ + public static ResourceStateError fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceStateError deserializedResourceStateError = new ResourceStateError(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resourceId".equals(fieldName)) { + deserializedResourceStateError.resourceId = reader.getString(); + } else if ("errorCode".equals(fieldName)) { + deserializedResourceStateError.errorCode = reader.getInt(); + } else if ("errorMessage".equals(fieldName)) { + deserializedResourceStateError.errorMessage = reader.getString(); + } else if ("remediationUri".equals(fieldName)) { + deserializedResourceStateError.remediationUri = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceStateError; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/RoleAssignmentError.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/RoleAssignmentError.java new file mode 100644 index 000000000000..afc1ab9986b8 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/RoleAssignmentError.java @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Error details for a failed role assignment. + */ +@Immutable +public final class RoleAssignmentError implements JsonSerializable { + /* + * Azure error code. + */ + private String code; + + /* + * Error message. + */ + private String message; + + /** + * Creates an instance of RoleAssignmentError class. + */ + private RoleAssignmentError() { + } + + /** + * Get the code property: Azure error code. + * + * @return the code value. + */ + public String code() { + return this.code; + } + + /** + * Get the message property: Error message. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RoleAssignmentError from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RoleAssignmentError if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the RoleAssignmentError. + */ + public static RoleAssignmentError fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RoleAssignmentError deserializedRoleAssignmentError = new RoleAssignmentError(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("code".equals(fieldName)) { + deserializedRoleAssignmentError.code = reader.getString(); + } else if ("message".equals(fieldName)) { + deserializedRoleAssignmentError.message = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedRoleAssignmentError; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/RoleAssignmentResult.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/RoleAssignmentResult.java new file mode 100644 index 000000000000..89d08485d3cb --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/RoleAssignmentResult.java @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Result of a single role assignment operation. + */ +@Immutable +public final class RoleAssignmentResult implements JsonSerializable { + /* + * The target Azure resource ID. + */ + private String targetResourceId; + + /* + * The managed identity principal ID. + */ + private String principalId; + + /* + * The Azure RBAC role definition ID. + */ + private String roleDefinitionId; + + /* + * Human-readable role name. + */ + private String roleDefinitionName; + + /* + * The scope at which the role was/will be assigned. + */ + private String scope; + + /* + * The status of the role assignment operation. + */ + private RoleAssignmentStatus status; + + /* + * The created role assignment resource ID (null if failed or what-if mode). + */ + private String roleAssignmentId; + + /* + * Error details if the assignment failed. + */ + private RoleAssignmentError error; + + /** + * Creates an instance of RoleAssignmentResult class. + */ + private RoleAssignmentResult() { + } + + /** + * Get the targetResourceId property: The target Azure resource ID. + * + * @return the targetResourceId value. + */ + public String targetResourceId() { + return this.targetResourceId; + } + + /** + * Get the principalId property: The managed identity principal ID. + * + * @return the principalId value. + */ + public String principalId() { + return this.principalId; + } + + /** + * Get the roleDefinitionId property: The Azure RBAC role definition ID. + * + * @return the roleDefinitionId value. + */ + public String roleDefinitionId() { + return this.roleDefinitionId; + } + + /** + * Get the roleDefinitionName property: Human-readable role name. + * + * @return the roleDefinitionName value. + */ + public String roleDefinitionName() { + return this.roleDefinitionName; + } + + /** + * Get the scope property: The scope at which the role was/will be assigned. + * + * @return the scope value. + */ + public String scope() { + return this.scope; + } + + /** + * Get the status property: The status of the role assignment operation. + * + * @return the status value. + */ + public RoleAssignmentStatus status() { + return this.status; + } + + /** + * Get the roleAssignmentId property: The created role assignment resource ID (null if failed or what-if mode). + * + * @return the roleAssignmentId value. + */ + public String roleAssignmentId() { + return this.roleAssignmentId; + } + + /** + * Get the error property: Error details if the assignment failed. + * + * @return the error value. + */ + public RoleAssignmentError error() { + return this.error; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RoleAssignmentResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RoleAssignmentResult if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the RoleAssignmentResult. + */ + public static RoleAssignmentResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RoleAssignmentResult deserializedRoleAssignmentResult = new RoleAssignmentResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("targetResourceId".equals(fieldName)) { + deserializedRoleAssignmentResult.targetResourceId = reader.getString(); + } else if ("principalId".equals(fieldName)) { + deserializedRoleAssignmentResult.principalId = reader.getString(); + } else if ("roleDefinitionId".equals(fieldName)) { + deserializedRoleAssignmentResult.roleDefinitionId = reader.getString(); + } else if ("roleDefinitionName".equals(fieldName)) { + deserializedRoleAssignmentResult.roleDefinitionName = reader.getString(); + } else if ("scope".equals(fieldName)) { + deserializedRoleAssignmentResult.scope = reader.getString(); + } else if ("status".equals(fieldName)) { + deserializedRoleAssignmentResult.status = RoleAssignmentStatus.fromString(reader.getString()); + } else if ("roleAssignmentId".equals(fieldName)) { + deserializedRoleAssignmentResult.roleAssignmentId = reader.getString(); + } else if ("error".equals(fieldName)) { + deserializedRoleAssignmentResult.error = RoleAssignmentError.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedRoleAssignmentResult; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/RoleAssignmentStatus.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/RoleAssignmentStatus.java new file mode 100644 index 000000000000..52365443d7e7 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/RoleAssignmentStatus.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Enum of the role assignment status. + */ +public final class RoleAssignmentStatus extends ExpandableStringEnum { + /** + * The role assignment succeeded. + */ + public static final RoleAssignmentStatus SUCCEEDED = fromString("Succeeded"); + + /** + * The role assignment failed. + */ + public static final RoleAssignmentStatus FAILED = fromString("Failed"); + + /** + * The role assignment was skipped (already exists). + */ + public static final RoleAssignmentStatus SKIPPED = fromString("Skipped"); + + /** + * The role assignment is pending (what-if mode). + */ + public static final RoleAssignmentStatus PENDING = fromString("Pending"); + + /** + * Creates a new instance of RoleAssignmentStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RoleAssignmentStatus() { + } + + /** + * Creates or finds a RoleAssignmentStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding RoleAssignmentStatus. + */ + public static RoleAssignmentStatus fromString(String name) { + return fromString(name, RoleAssignmentStatus.class); + } + + /** + * Gets known RoleAssignmentStatus values. + * + * @return known RoleAssignmentStatus values. + */ + public static Collection values() { + return values(RoleAssignmentStatus.class); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/RunAfter.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/RunAfter.java new file mode 100644 index 000000000000..72f548664ad9 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/RunAfter.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Model that represents action dependencies. + */ +@Fluent +public final class RunAfter implements JsonSerializable { + /* + * Defines how multiple dependencies are evaluated. + */ + private RunAfterBehavior behavior; + + /* + * Array of action dependencies. + */ + private List items; + + /** + * Creates an instance of RunAfter class. + */ + public RunAfter() { + } + + /** + * Get the behavior property: Defines how multiple dependencies are evaluated. + * + * @return the behavior value. + */ + public RunAfterBehavior behavior() { + return this.behavior; + } + + /** + * Set the behavior property: Defines how multiple dependencies are evaluated. + * + * @param behavior the behavior value to set. + * @return the RunAfter object itself. + */ + public RunAfter withBehavior(RunAfterBehavior behavior) { + this.behavior = behavior; + return this; + } + + /** + * Get the items property: Array of action dependencies. + * + * @return the items value. + */ + public List items() { + return this.items; + } + + /** + * Set the items property: Array of action dependencies. + * + * @param items the items value to set. + * @return the RunAfter object itself. + */ + public RunAfter withItems(List items) { + this.items = items; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("items", this.items, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("behavior", this.behavior == null ? null : this.behavior.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RunAfter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RunAfter if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the RunAfter. + */ + public static RunAfter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RunAfter deserializedRunAfter = new RunAfter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("items".equals(fieldName)) { + List items = reader.readArray(reader1 -> ActionDependency.fromJson(reader1)); + deserializedRunAfter.items = items; + } else if ("behavior".equals(fieldName)) { + deserializedRunAfter.behavior = RunAfterBehavior.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedRunAfter; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/RunAfterBehavior.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/RunAfterBehavior.java new file mode 100644 index 000000000000..2d961ad6aa90 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/RunAfterBehavior.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Enum for run after behavior. + */ +public final class RunAfterBehavior extends ExpandableStringEnum { + /** + * Always continues after all dependencies (like a finally block). + */ + public static final RunAfterBehavior ANY = fromString("Any"); + + /** + * All dependencies must be satisfied to continue. + */ + public static final RunAfterBehavior ALL = fromString("All"); + + /** + * At least one dependency must be satisfied to continue. + */ + public static final RunAfterBehavior AT_LEAST_ONE = fromString("AtLeastOne"); + + /** + * Creates a new instance of RunAfterBehavior value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RunAfterBehavior() { + } + + /** + * Creates or finds a RunAfterBehavior from its string representation. + * + * @param name a name to look for. + * @return the corresponding RunAfterBehavior. + */ + public static RunAfterBehavior fromString(String name) { + return fromString(name, RunAfterBehavior.class); + } + + /** + * Gets known RunAfterBehavior values. + * + * @return known RunAfterBehavior values. + */ + public static Collection values() { + return values(RunAfterBehavior.class); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Scenario.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Scenario.java new file mode 100644 index 000000000000..64957088f160 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Scenario.java @@ -0,0 +1,189 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.chaos.fluent.models.ScenarioInner; + +/** + * An immutable client-side representation of Scenario. + */ +public interface Scenario { + /** + * 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 properties property: The properties of scenario. + * + * @return the properties value. + */ + ScenarioProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * 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.ScenarioInner object. + * + * @return the inner object. + */ + ScenarioInner innerModel(); + + /** + * The entirety of the Scenario definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The Scenario definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the Scenario definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the Scenario definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, workspaceName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @return the next definition stage. + */ + WithCreate withExistingWorkspace(String resourceGroupName, String workspaceName); + } + + /** + * The stage of the Scenario definition which contains all the minimum required properties for the resource to + * be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithProperties { + /** + * Executes the create request. + * + * @return the created resource. + */ + Scenario create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + Scenario create(Context context); + } + + /** + * The stage of the Scenario definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The properties of scenario.. + * + * @param properties The properties of scenario. + * @return the next definition stage. + */ + WithCreate withProperties(ScenarioProperties properties); + } + } + + /** + * Begins update for the Scenario resource. + * + * @return the stage of resource update. + */ + Scenario.Update update(); + + /** + * The template for Scenario update. + */ + interface Update extends UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + Scenario apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + Scenario apply(Context context); + } + + /** + * The Scenario update stages. + */ + interface UpdateStages { + /** + * The stage of the Scenario update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The properties of scenario.. + * + * @param properties The properties of scenario. + * @return the next definition stage. + */ + Update withProperties(ScenarioProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + Scenario refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + Scenario refresh(Context context); +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioAction.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioAction.java new file mode 100644 index 000000000000..376512215eb6 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioAction.java @@ -0,0 +1,317 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Model that represents a scenario action. + */ +@Fluent +public final class ScenarioAction implements JsonSerializable { + /* + * Unique name for the action. + */ + private String name; + + /* + * Identifier of the action and version (e.g., "microsoft-compute-shutdown/1.0"). + */ + private String actionId; + + /* + * Human-readable description of what this action does. + */ + private String description; + + /* + * ISO 8601 duration for how long the action runs (e.g., PT30M for 30 minutes). Supports template macro syntax + * (%%\{parameters.\\}%%). + */ + private String duration; + + /* + * Action-specific parameter values. + */ + private List parameters; + + /* + * Action dependencies that control when this action starts. + */ + private RunAfter runAfter; + + /* + * ISO 8601 duration to wait before action starts (e.g., PT30S for 30 seconds). Supports template macro syntax. + */ + private String waitBefore; + + /* + * ISO 8601 duration for maximum action execution time. Supports template macro syntax. + */ + private String timeout; + + /* + * External resource reference for the action. + */ + private ExternalResource externalResource; + + /** + * Creates an instance of ScenarioAction class. + */ + public ScenarioAction() { + } + + /** + * Get the name property: Unique name for the action. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Unique name for the action. + * + * @param name the name value to set. + * @return the ScenarioAction object itself. + */ + public ScenarioAction withName(String name) { + this.name = name; + return this; + } + + /** + * Get the actionId property: Identifier of the action and version (e.g., "microsoft-compute-shutdown/1.0"). + * + * @return the actionId value. + */ + public String actionId() { + return this.actionId; + } + + /** + * Set the actionId property: Identifier of the action and version (e.g., "microsoft-compute-shutdown/1.0"). + * + * @param actionId the actionId value to set. + * @return the ScenarioAction object itself. + */ + public ScenarioAction withActionId(String actionId) { + this.actionId = actionId; + return this; + } + + /** + * Get the description property: Human-readable description of what this action does. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Human-readable description of what this action does. + * + * @param description the description value to set. + * @return the ScenarioAction object itself. + */ + public ScenarioAction withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the duration property: ISO 8601 duration for how long the action runs (e.g., PT30M for 30 minutes). Supports + * template macro syntax (%%\{parameters.\<name\>\}%%). + * + * @return the duration value. + */ + public String duration() { + return this.duration; + } + + /** + * Set the duration property: ISO 8601 duration for how long the action runs (e.g., PT30M for 30 minutes). Supports + * template macro syntax (%%\{parameters.\<name\>\}%%). + * + * @param duration the duration value to set. + * @return the ScenarioAction object itself. + */ + public ScenarioAction withDuration(String duration) { + this.duration = duration; + return this; + } + + /** + * Get the parameters property: Action-specific parameter values. + * + * @return the parameters value. + */ + public List parameters() { + return this.parameters; + } + + /** + * Set the parameters property: Action-specific parameter values. + * + * @param parameters the parameters value to set. + * @return the ScenarioAction object itself. + */ + public ScenarioAction withParameters(List parameters) { + this.parameters = parameters; + return this; + } + + /** + * Get the runAfter property: Action dependencies that control when this action starts. + * + * @return the runAfter value. + */ + public RunAfter runAfter() { + return this.runAfter; + } + + /** + * Set the runAfter property: Action dependencies that control when this action starts. + * + * @param runAfter the runAfter value to set. + * @return the ScenarioAction object itself. + */ + public ScenarioAction withRunAfter(RunAfter runAfter) { + this.runAfter = runAfter; + return this; + } + + /** + * Get the waitBefore property: ISO 8601 duration to wait before action starts (e.g., PT30S for 30 seconds). + * Supports template macro syntax. + * + * @return the waitBefore value. + */ + public String waitBefore() { + return this.waitBefore; + } + + /** + * Set the waitBefore property: ISO 8601 duration to wait before action starts (e.g., PT30S for 30 seconds). + * Supports template macro syntax. + * + * @param waitBefore the waitBefore value to set. + * @return the ScenarioAction object itself. + */ + public ScenarioAction withWaitBefore(String waitBefore) { + this.waitBefore = waitBefore; + return this; + } + + /** + * Get the timeout property: ISO 8601 duration for maximum action execution time. Supports template macro syntax. + * + * @return the timeout value. + */ + public String timeout() { + return this.timeout; + } + + /** + * Set the timeout property: ISO 8601 duration for maximum action execution time. Supports template macro syntax. + * + * @param timeout the timeout value to set. + * @return the ScenarioAction object itself. + */ + public ScenarioAction withTimeout(String timeout) { + this.timeout = timeout; + return this; + } + + /** + * Get the externalResource property: External resource reference for the action. + * + * @return the externalResource value. + */ + public ExternalResource externalResource() { + return this.externalResource; + } + + /** + * Set the externalResource property: External resource reference for the action. + * + * @param externalResource the externalResource value to set. + * @return the ScenarioAction object itself. + */ + public ScenarioAction withExternalResource(ExternalResource externalResource) { + this.externalResource = externalResource; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("actionId", this.actionId); + jsonWriter.writeStringField("duration", this.duration); + jsonWriter.writeStringField("description", this.description); + jsonWriter.writeArrayField("parameters", this.parameters, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("runAfter", this.runAfter); + jsonWriter.writeStringField("waitBefore", this.waitBefore); + jsonWriter.writeStringField("timeout", this.timeout); + jsonWriter.writeJsonField("externalResource", this.externalResource); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ScenarioAction from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ScenarioAction if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ScenarioAction. + */ + public static ScenarioAction fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ScenarioAction deserializedScenarioAction = new ScenarioAction(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedScenarioAction.name = reader.getString(); + } else if ("actionId".equals(fieldName)) { + deserializedScenarioAction.actionId = reader.getString(); + } else if ("duration".equals(fieldName)) { + deserializedScenarioAction.duration = reader.getString(); + } else if ("description".equals(fieldName)) { + deserializedScenarioAction.description = reader.getString(); + } else if ("parameters".equals(fieldName)) { + List parameters = reader.readArray(reader1 -> KeyValuePair.fromJson(reader1)); + deserializedScenarioAction.parameters = parameters; + } else if ("runAfter".equals(fieldName)) { + deserializedScenarioAction.runAfter = RunAfter.fromJson(reader); + } else if ("waitBefore".equals(fieldName)) { + deserializedScenarioAction.waitBefore = reader.getString(); + } else if ("timeout".equals(fieldName)) { + deserializedScenarioAction.timeout = reader.getString(); + } else if ("externalResource".equals(fieldName)) { + deserializedScenarioAction.externalResource = ExternalResource.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedScenarioAction; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioConfiguration.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioConfiguration.java new file mode 100644 index 000000000000..291ae6b98578 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioConfiguration.java @@ -0,0 +1,250 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.chaos.fluent.models.ScenarioConfigurationInner; + +/** + * An immutable client-side representation of ScenarioConfiguration. + */ +public interface ScenarioConfiguration { + /** + * 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 properties property: The properties of scenario definition. + * + * @return the properties value. + */ + ScenarioConfigurationProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * 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.ScenarioConfigurationInner object. + * + * @return the inner object. + */ + ScenarioConfigurationInner innerModel(); + + /** + * The entirety of the ScenarioConfiguration definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The ScenarioConfiguration definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the ScenarioConfiguration definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the ScenarioConfiguration definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, workspaceName, scenarioName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @return the next definition stage. + */ + WithCreate withExistingScenario(String resourceGroupName, String workspaceName, String scenarioName); + } + + /** + * The stage of the ScenarioConfiguration definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithProperties { + /** + * Executes the create request. + * + * @return the created resource. + */ + ScenarioConfiguration create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + ScenarioConfiguration create(Context context); + } + + /** + * The stage of the ScenarioConfiguration definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The properties of scenario definition.. + * + * @param properties The properties of scenario definition. + * @return the next definition stage. + */ + WithCreate withProperties(ScenarioConfigurationProperties properties); + } + } + + /** + * Begins update for the ScenarioConfiguration resource. + * + * @return the stage of resource update. + */ + ScenarioConfiguration.Update update(); + + /** + * The template for ScenarioConfiguration update. + */ + interface Update extends UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + ScenarioConfiguration apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + ScenarioConfiguration apply(Context context); + } + + /** + * The ScenarioConfiguration update stages. + */ + interface UpdateStages { + /** + * The stage of the ScenarioConfiguration update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The properties of scenario definition.. + * + * @param properties The properties of scenario definition. + * @return the next definition stage. + */ + Update withProperties(ScenarioConfigurationProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + ScenarioConfiguration refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + ScenarioConfiguration refresh(Context context); + + /** + * Execute the scenario execution with the given scenario configuration. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + ScenarioConfigurationsExecuteResponse executeWithResponse(Context context); + + /** + * Execute the scenario execution with the given scenario configuration. + * + * @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 execute(); + + /** + * Validate the given scenario configuration. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Validation validate(); + + /** + * Validate the given scenario configuration. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Validation validate(Context context); + + /** + * Fixes resource permissions for the given scenario configuration. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + PermissionsFix fixResourcePermissions(); + + /** + * Fixes resource permissions for the given scenario configuration. + * + * @param body The body parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + PermissionsFix fixResourcePermissions(FixResourcePermissionsRequest body, Context context); +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioConfigurationProperties.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioConfigurationProperties.java new file mode 100644 index 000000000000..3ea1816ab52e --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioConfigurationProperties.java @@ -0,0 +1,194 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Model that represents the properties of the scenario configuration. + */ +@Fluent +public final class ScenarioConfigurationProperties implements JsonSerializable { + /* + * Resource ID of the scenario this configuration applies to. + */ + private String scenarioId; + + /* + * Runtime parameter values for the scenario. Keys must match parameter names defined in the scenario. + */ + private List parameters; + + /* + * Exclusion criteria for protecting resources from fault injection. + */ + private ConfigurationExclusions exclusions; + + /* + * Most recent provisioning state for the given scenario resource. + */ + private ProvisioningState provisioningState; + + /* + * Filter criteria used to constrain which discovered resources participate in fault injection. + */ + private ConfigurationFilters filters; + + /** + * Creates an instance of ScenarioConfigurationProperties class. + */ + public ScenarioConfigurationProperties() { + } + + /** + * Get the scenarioId property: Resource ID of the scenario this configuration applies to. + * + * @return the scenarioId value. + */ + public String scenarioId() { + return this.scenarioId; + } + + /** + * Set the scenarioId property: Resource ID of the scenario this configuration applies to. + * + * @param scenarioId the scenarioId value to set. + * @return the ScenarioConfigurationProperties object itself. + */ + public ScenarioConfigurationProperties withScenarioId(String scenarioId) { + this.scenarioId = scenarioId; + return this; + } + + /** + * Get the parameters property: Runtime parameter values for the scenario. Keys must match parameter names defined + * in the scenario. + * + * @return the parameters value. + */ + public List parameters() { + return this.parameters; + } + + /** + * Set the parameters property: Runtime parameter values for the scenario. Keys must match parameter names defined + * in the scenario. + * + * @param parameters the parameters value to set. + * @return the ScenarioConfigurationProperties object itself. + */ + public ScenarioConfigurationProperties withParameters(List parameters) { + this.parameters = parameters; + return this; + } + + /** + * Get the exclusions property: Exclusion criteria for protecting resources from fault injection. + * + * @return the exclusions value. + */ + public ConfigurationExclusions exclusions() { + return this.exclusions; + } + + /** + * Set the exclusions property: Exclusion criteria for protecting resources from fault injection. + * + * @param exclusions the exclusions value to set. + * @return the ScenarioConfigurationProperties object itself. + */ + public ScenarioConfigurationProperties withExclusions(ConfigurationExclusions exclusions) { + this.exclusions = exclusions; + return this; + } + + /** + * Get the provisioningState property: Most recent provisioning state for the given scenario resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the filters property: Filter criteria used to constrain which discovered resources participate in fault + * injection. + * + * @return the filters value. + */ + public ConfigurationFilters filters() { + return this.filters; + } + + /** + * Set the filters property: Filter criteria used to constrain which discovered resources participate in fault + * injection. + * + * @param filters the filters value to set. + * @return the ScenarioConfigurationProperties object itself. + */ + public ScenarioConfigurationProperties withFilters(ConfigurationFilters filters) { + this.filters = filters; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("scenarioId", this.scenarioId); + jsonWriter.writeArrayField("parameters", this.parameters, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("exclusions", this.exclusions); + jsonWriter.writeJsonField("filters", this.filters); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ScenarioConfigurationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ScenarioConfigurationProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ScenarioConfigurationProperties. + */ + public static ScenarioConfigurationProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ScenarioConfigurationProperties deserializedScenarioConfigurationProperties + = new ScenarioConfigurationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("scenarioId".equals(fieldName)) { + deserializedScenarioConfigurationProperties.scenarioId = reader.getString(); + } else if ("parameters".equals(fieldName)) { + List parameters = reader.readArray(reader1 -> KeyValuePair.fromJson(reader1)); + deserializedScenarioConfigurationProperties.parameters = parameters; + } else if ("exclusions".equals(fieldName)) { + deserializedScenarioConfigurationProperties.exclusions = ConfigurationExclusions.fromJson(reader); + } else if ("provisioningState".equals(fieldName)) { + deserializedScenarioConfigurationProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("filters".equals(fieldName)) { + deserializedScenarioConfigurationProperties.filters = ConfigurationFilters.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedScenarioConfigurationProperties; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioConfigurations.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioConfigurations.java new file mode 100644 index 000000000000..df8edc780272 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioConfigurations.java @@ -0,0 +1,245 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of ScenarioConfigurations. + */ +public interface ScenarioConfigurations { + /** + * Get a scenario definition. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a scenario definition along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String workspaceName, String scenarioName, + String scenarioConfigurationName, Context context); + + /** + * Get a scenario definition. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @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 scenario definition. + */ + ScenarioConfiguration get(String resourceGroupName, String workspaceName, String scenarioName, + String scenarioConfigurationName); + + /** + * Delete a scenario definition. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @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. + */ + void delete(String resourceGroupName, String workspaceName, String scenarioName, String scenarioConfigurationName); + + /** + * Delete a scenario definition. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String workspaceName, String scenarioName, String scenarioConfigurationName, + Context context); + + /** + * Get a list of scenario definitions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @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 scenario definitions as paginated response with {@link PagedIterable}. + */ + PagedIterable listAll(String resourceGroupName, String workspaceName, String scenarioName); + + /** + * Get a list of scenario definitions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of scenario definitions as paginated response with {@link PagedIterable}. + */ + PagedIterable listAll(String resourceGroupName, String workspaceName, String scenarioName, + Context context); + + /** + * Execute the scenario execution with the given scenario configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + ScenarioConfigurationsExecuteResponse executeWithResponse(String resourceGroupName, String workspaceName, + String scenarioName, String scenarioConfigurationName, Context context); + + /** + * Execute the scenario execution with the given scenario configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @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. + */ + void execute(String resourceGroupName, String workspaceName, String scenarioName, String scenarioConfigurationName); + + /** + * Validate the given scenario configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Validation validate(String resourceGroupName, String workspaceName, String scenarioName, + String scenarioConfigurationName); + + /** + * Validate the given scenario configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Validation validate(String resourceGroupName, String workspaceName, String scenarioName, + String scenarioConfigurationName, Context context); + + /** + * Fixes resource permissions for the given scenario configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + PermissionsFix fixResourcePermissions(String resourceGroupName, String workspaceName, String scenarioName, + String scenarioConfigurationName); + + /** + * Fixes resource permissions for the given scenario configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param scenarioConfigurationName Name of the scenario definition. + * @param body The body parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + PermissionsFix fixResourcePermissions(String resourceGroupName, String workspaceName, String scenarioName, + String scenarioConfigurationName, FixResourcePermissionsRequest body, Context context); + + /** + * Get a scenario definition. + * + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a scenario definition along with {@link Response}. + */ + ScenarioConfiguration getById(String id); + + /** + * Get a scenario definition. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a scenario definition along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a scenario definition. + * + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete a scenario definition. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new ScenarioConfiguration resource. + * + * @param name resource name. + * @return the first stage of the new ScenarioConfiguration definition. + */ + ScenarioConfiguration.DefinitionStages.Blank define(String name); +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioConfigurationsExecuteHeaders.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioConfigurationsExecuteHeaders.java new file mode 100644 index 000000000000..cbef26d61b78 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioConfigurationsExecuteHeaders.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpHeaders; + +/** + * The ScenarioConfigurationsExecuteHeaders model. + */ +@Immutable +public final class ScenarioConfigurationsExecuteHeaders { + /* + * The Location property. + */ + private final String location; + + /* + * The Retry-After property. + */ + private final Integer retryAfter; + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of ScenarioConfigurationsExecuteHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public ScenarioConfigurationsExecuteHeaders(HttpHeaders rawHeaders) { + this.location = rawHeaders.getValue(HttpHeaderName.LOCATION); + String retryAfter = rawHeaders.getValue(HttpHeaderName.RETRY_AFTER); + if (retryAfter != null) { + this.retryAfter = Integer.parseInt(retryAfter); + } else { + this.retryAfter = null; + } + } + + /** + * Get the location property: The Location property. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Get the retryAfter property: The Retry-After property. + * + * @return the retryAfter value. + */ + public Integer retryAfter() { + return this.retryAfter; + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioConfigurationsExecuteResponse.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioConfigurationsExecuteResponse.java new file mode 100644 index 000000000000..00f7c16383cd --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioConfigurationsExecuteResponse.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** + * Contains all response data for the execute operation. + */ +public final class ScenarioConfigurationsExecuteResponse + extends ResponseBase { + /** + * Creates an instance of ScenarioConfigurationsExecuteResponse. + * + * @param request the request which resulted in this ScenarioConfigurationsExecuteResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public ScenarioConfigurationsExecuteResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, + Void value, ScenarioConfigurationsExecuteHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioErrors.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioErrors.java new file mode 100644 index 000000000000..5ea9f62a6d07 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioErrors.java @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Model that represents the scenario run errors. + */ +@Immutable +public final class ScenarioErrors implements JsonSerializable { + /* + * Error code for internal server errors. + */ + private String errorCode; + + /* + * Error message for internal server errors. + */ + private String errorMessage; + + /* + * Any permission errors associated with the scenario run. + */ + private List permission; + + /* + * Any resource state errors associated with the scenario run. + */ + private List resource; + + /** + * Creates an instance of ScenarioErrors class. + */ + private ScenarioErrors() { + } + + /** + * Get the errorCode property: Error code for internal server errors. + * + * @return the errorCode value. + */ + public String errorCode() { + return this.errorCode; + } + + /** + * Get the errorMessage property: Error message for internal server errors. + * + * @return the errorMessage value. + */ + public String errorMessage() { + return this.errorMessage; + } + + /** + * Get the permission property: Any permission errors associated with the scenario run. + * + * @return the permission value. + */ + public List permission() { + return this.permission; + } + + /** + * Get the resource property: Any resource state errors associated with the scenario run. + * + * @return the resource value. + */ + public List resource() { + return this.resource; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("errorCode", this.errorCode); + jsonWriter.writeStringField("errorMessage", this.errorMessage); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ScenarioErrors from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ScenarioErrors if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ScenarioErrors. + */ + public static ScenarioErrors fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ScenarioErrors deserializedScenarioErrors = new ScenarioErrors(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("permission".equals(fieldName)) { + List permission = reader.readArray(reader1 -> PermissionError.fromJson(reader1)); + deserializedScenarioErrors.permission = permission; + } else if ("resource".equals(fieldName)) { + List resource + = reader.readArray(reader1 -> ResourceStateError.fromJson(reader1)); + deserializedScenarioErrors.resource = resource; + } else if ("errorCode".equals(fieldName)) { + deserializedScenarioErrors.errorCode = reader.getString(); + } else if ("errorMessage".equals(fieldName)) { + deserializedScenarioErrors.errorMessage = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedScenarioErrors; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioEvaluationResultItem.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioEvaluationResultItem.java new file mode 100644 index 000000000000..d29bcb1e6cff --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioEvaluationResultItem.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Model that represents a single scenario evaluation result. + */ +@Immutable +public final class ScenarioEvaluationResultItem implements JsonSerializable { + /* + * The name of the scenario that was evaluated. + */ + private String scenarioName; + + /* + * The evaluation result for this scenario. + */ + private RecommendationStatus evaluationResult; + + /** + * Creates an instance of ScenarioEvaluationResultItem class. + */ + private ScenarioEvaluationResultItem() { + } + + /** + * Get the scenarioName property: The name of the scenario that was evaluated. + * + * @return the scenarioName value. + */ + public String scenarioName() { + return this.scenarioName; + } + + /** + * Get the evaluationResult property: The evaluation result for this scenario. + * + * @return the evaluationResult value. + */ + public RecommendationStatus evaluationResult() { + return this.evaluationResult; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("scenarioName", this.scenarioName); + jsonWriter.writeStringField("evaluationResult", + this.evaluationResult == null ? null : this.evaluationResult.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ScenarioEvaluationResultItem from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ScenarioEvaluationResultItem if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ScenarioEvaluationResultItem. + */ + public static ScenarioEvaluationResultItem fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ScenarioEvaluationResultItem deserializedScenarioEvaluationResultItem = new ScenarioEvaluationResultItem(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("scenarioName".equals(fieldName)) { + deserializedScenarioEvaluationResultItem.scenarioName = reader.getString(); + } else if ("evaluationResult".equals(fieldName)) { + deserializedScenarioEvaluationResultItem.evaluationResult + = RecommendationStatus.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedScenarioEvaluationResultItem; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioParameter.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioParameter.java new file mode 100644 index 000000000000..fdcfbd181e67 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioParameter.java @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Model that represents a single scenario parameter definition. + */ +@Fluent +public final class ScenarioParameter implements JsonSerializable { + /* + * The name of the parameter. + */ + private String name; + + /* + * Parameter data type. + */ + private ParameterType type; + + /* + * Default value for the parameter. + */ + private String defaultProperty; + + /* + * Whether this parameter is required. + */ + private Boolean required; + + /* + * Description of the parameter. + */ + private String description; + + /** + * Creates an instance of ScenarioParameter class. + */ + public ScenarioParameter() { + } + + /** + * Get the name property: The name of the parameter. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name of the parameter. + * + * @param name the name value to set. + * @return the ScenarioParameter object itself. + */ + public ScenarioParameter withName(String name) { + this.name = name; + return this; + } + + /** + * Get the type property: Parameter data type. + * + * @return the type value. + */ + public ParameterType type() { + return this.type; + } + + /** + * Set the type property: Parameter data type. + * + * @param type the type value to set. + * @return the ScenarioParameter object itself. + */ + public ScenarioParameter withType(ParameterType type) { + this.type = type; + return this; + } + + /** + * Get the defaultProperty property: Default value for the parameter. + * + * @return the defaultProperty value. + */ + public String defaultProperty() { + return this.defaultProperty; + } + + /** + * Set the defaultProperty property: Default value for the parameter. + * + * @param defaultProperty the defaultProperty value to set. + * @return the ScenarioParameter object itself. + */ + public ScenarioParameter withDefaultProperty(String defaultProperty) { + this.defaultProperty = defaultProperty; + return this; + } + + /** + * Get the required property: Whether this parameter is required. + * + * @return the required value. + */ + public Boolean required() { + return this.required; + } + + /** + * Set the required property: Whether this parameter is required. + * + * @param required the required value to set. + * @return the ScenarioParameter object itself. + */ + public ScenarioParameter withRequired(Boolean required) { + this.required = required; + return this; + } + + /** + * Get the description property: Description of the parameter. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Description of the parameter. + * + * @param description the description value to set. + * @return the ScenarioParameter object itself. + */ + public ScenarioParameter withDescription(String description) { + this.description = description; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("default", this.defaultProperty); + jsonWriter.writeBooleanField("required", this.required); + jsonWriter.writeStringField("description", this.description); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ScenarioParameter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ScenarioParameter if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ScenarioParameter. + */ + public static ScenarioParameter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ScenarioParameter deserializedScenarioParameter = new ScenarioParameter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedScenarioParameter.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedScenarioParameter.type = ParameterType.fromString(reader.getString()); + } else if ("default".equals(fieldName)) { + deserializedScenarioParameter.defaultProperty = reader.getString(); + } else if ("required".equals(fieldName)) { + deserializedScenarioParameter.required = reader.getNullable(JsonReader::getBoolean); + } else if ("description".equals(fieldName)) { + deserializedScenarioParameter.description = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedScenarioParameter; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioProperties.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioProperties.java new file mode 100644 index 000000000000..eaa5cba770e7 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioProperties.java @@ -0,0 +1,210 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Model that represents the properties of the scenario. + */ +@Fluent +public final class ScenarioProperties implements JsonSerializable { + /* + * Most recent provisioning state for the given scenario resource. + */ + private ProvisioningState provisioningState; + + /* + * Resource ID of the template version this scenario was created from (optional). + */ + private String createdFrom; + + /* + * Version of the scenario. + */ + private String version; + + /* + * Description of what this scenario does (optional). + */ + private String description; + + /* + * Parameter definitions for the scenario. + */ + private List parameters; + + /* + * Array of actions that define the scenario's orchestration. + */ + private List actions; + + /* + * The recommendation information for this scenario. + */ + private Recommendation recommendation; + + /** + * Creates an instance of ScenarioProperties class. + */ + public ScenarioProperties() { + } + + /** + * Get the provisioningState property: Most recent provisioning state for the given scenario resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the createdFrom property: Resource ID of the template version this scenario was created from (optional). + * + * @return the createdFrom value. + */ + public String createdFrom() { + return this.createdFrom; + } + + /** + * Get the version property: Version of the scenario. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Get the description property: Description of what this scenario does (optional). + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Description of what this scenario does (optional). + * + * @param description the description value to set. + * @return the ScenarioProperties object itself. + */ + public ScenarioProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the parameters property: Parameter definitions for the scenario. + * + * @return the parameters value. + */ + public List parameters() { + return this.parameters; + } + + /** + * Set the parameters property: Parameter definitions for the scenario. + * + * @param parameters the parameters value to set. + * @return the ScenarioProperties object itself. + */ + public ScenarioProperties withParameters(List parameters) { + this.parameters = parameters; + return this; + } + + /** + * Get the actions property: Array of actions that define the scenario's orchestration. + * + * @return the actions value. + */ + public List actions() { + return this.actions; + } + + /** + * Set the actions property: Array of actions that define the scenario's orchestration. + * + * @param actions the actions value to set. + * @return the ScenarioProperties object itself. + */ + public ScenarioProperties withActions(List actions) { + this.actions = actions; + return this; + } + + /** + * Get the recommendation property: The recommendation information for this scenario. + * + * @return the recommendation value. + */ + public Recommendation recommendation() { + return this.recommendation; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("parameters", this.parameters, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("actions", this.actions, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("description", this.description); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ScenarioProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ScenarioProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ScenarioProperties. + */ + public static ScenarioProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ScenarioProperties deserializedScenarioProperties = new ScenarioProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("parameters".equals(fieldName)) { + List parameters + = reader.readArray(reader1 -> ScenarioParameter.fromJson(reader1)); + deserializedScenarioProperties.parameters = parameters; + } else if ("actions".equals(fieldName)) { + List actions = reader.readArray(reader1 -> ScenarioAction.fromJson(reader1)); + deserializedScenarioProperties.actions = actions; + } else if ("provisioningState".equals(fieldName)) { + deserializedScenarioProperties.provisioningState = ProvisioningState.fromString(reader.getString()); + } else if ("createdFrom".equals(fieldName)) { + deserializedScenarioProperties.createdFrom = reader.getString(); + } else if ("version".equals(fieldName)) { + deserializedScenarioProperties.version = reader.getString(); + } else if ("description".equals(fieldName)) { + deserializedScenarioProperties.description = reader.getString(); + } else if ("recommendation".equals(fieldName)) { + deserializedScenarioProperties.recommendation = Recommendation.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedScenarioProperties; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRun.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRun.java new file mode 100644 index 000000000000..99e95d53b950 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRun.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.chaos.fluent.models.ScenarioRunInner; + +/** + * An immutable client-side representation of ScenarioRun. + */ +public interface ScenarioRun { + /** + * 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 properties property: The properties of scenario run. + * + * @return the properties value. + */ + ScenarioRunProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner com.azure.resourcemanager.chaos.fluent.models.ScenarioRunInner object. + * + * @return the inner object. + */ + ScenarioRunInner innerModel(); +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunProperties.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunProperties.java new file mode 100644 index 000000000000..f47c286bdca8 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunProperties.java @@ -0,0 +1,280 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * Model that represents the properties of the scenario run. + */ +@Immutable +public final class ScenarioRunProperties implements JsonSerializable { + /* + * The workspace name. + */ + private String workspaceName; + + /* + * The scenario name. + */ + private String scenarioName; + + /* + * The scenario configuration name. + */ + private String scenarioConfigurationName; + + /* + * The principal id for the managed identity used for the run. + */ + private String managedIdentityPrincipalId; + + /* + * The scenario run status. + */ + private ScenarioRunState status; + + /* + * All resources discovered for the scenario run. + */ + private List resources; + + /* + * System or infrastructure errors encountered during the scenario run. + */ + private List errors; + + /* + * Business errors from fault injection — permission and resource state issues. + */ + private ScenarioErrors executionErrors; + + /* + * The scenario run json. + */ + private String scenarioRunJson; + + /* + * The scenario run summary. + */ + private List scenarioRunSummary; + + /* + * When the scenario run was started. + */ + private OffsetDateTime startTime; + + /* + * When the scenario run was completed. + */ + private OffsetDateTime endTime; + + /* + * Zone resolution information. Present when the scenario configuration + * used physical zone targeting (`physicalZones`). Contains the mode, + * requested physical zones, and per-subscription logical zone mappings. + */ + private ZoneResolutionInfo zoneResolution; + + /** + * Creates an instance of ScenarioRunProperties class. + */ + private ScenarioRunProperties() { + } + + /** + * Get the workspaceName property: The workspace name. + * + * @return the workspaceName value. + */ + public String workspaceName() { + return this.workspaceName; + } + + /** + * Get the scenarioName property: The scenario name. + * + * @return the scenarioName value. + */ + public String scenarioName() { + return this.scenarioName; + } + + /** + * Get the scenarioConfigurationName property: The scenario configuration name. + * + * @return the scenarioConfigurationName value. + */ + public String scenarioConfigurationName() { + return this.scenarioConfigurationName; + } + + /** + * Get the managedIdentityPrincipalId property: The principal id for the managed identity used for the run. + * + * @return the managedIdentityPrincipalId value. + */ + public String managedIdentityPrincipalId() { + return this.managedIdentityPrincipalId; + } + + /** + * Get the status property: The scenario run status. + * + * @return the status value. + */ + public ScenarioRunState status() { + return this.status; + } + + /** + * Get the resources property: All resources discovered for the scenario run. + * + * @return the resources value. + */ + public List resources() { + return this.resources; + } + + /** + * Get the errors property: System or infrastructure errors encountered during the scenario run. + * + * @return the errors value. + */ + public List errors() { + return this.errors; + } + + /** + * Get the executionErrors property: Business errors from fault injection — permission and resource state issues. + * + * @return the executionErrors value. + */ + public ScenarioErrors executionErrors() { + return this.executionErrors; + } + + /** + * Get the scenarioRunJson property: The scenario run json. + * + * @return the scenarioRunJson value. + */ + public String scenarioRunJson() { + return this.scenarioRunJson; + } + + /** + * Get the scenarioRunSummary property: The scenario run summary. + * + * @return the scenarioRunSummary value. + */ + public List scenarioRunSummary() { + return this.scenarioRunSummary; + } + + /** + * Get the startTime property: When the scenario run was started. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Get the endTime property: When the scenario run was completed. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Get the zoneResolution property: Zone resolution information. Present when the scenario configuration + * used physical zone targeting (`physicalZones`). Contains the mode, + * requested physical zones, and per-subscription logical zone mappings. + * + * @return the zoneResolution value. + */ + public ZoneResolutionInfo zoneResolution() { + return this.zoneResolution; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ScenarioRunProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ScenarioRunProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ScenarioRunProperties. + */ + public static ScenarioRunProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ScenarioRunProperties deserializedScenarioRunProperties = new ScenarioRunProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("workspaceName".equals(fieldName)) { + deserializedScenarioRunProperties.workspaceName = reader.getString(); + } else if ("scenarioName".equals(fieldName)) { + deserializedScenarioRunProperties.scenarioName = reader.getString(); + } else if ("scenarioConfigurationName".equals(fieldName)) { + deserializedScenarioRunProperties.scenarioConfigurationName = reader.getString(); + } else if ("managedIdentityPrincipalId".equals(fieldName)) { + deserializedScenarioRunProperties.managedIdentityPrincipalId = reader.getString(); + } else if ("status".equals(fieldName)) { + deserializedScenarioRunProperties.status = ScenarioRunState.fromString(reader.getString()); + } else if ("resources".equals(fieldName)) { + List resources + = reader.readArray(reader1 -> ScenarioRunResource.fromJson(reader1)); + deserializedScenarioRunProperties.resources = resources; + } else if ("startTime".equals(fieldName)) { + deserializedScenarioRunProperties.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("errors".equals(fieldName)) { + List errors = reader.readArray(reader1 -> OperationError.fromJson(reader1)); + deserializedScenarioRunProperties.errors = errors; + } else if ("executionErrors".equals(fieldName)) { + deserializedScenarioRunProperties.executionErrors = ScenarioErrors.fromJson(reader); + } else if ("scenarioRunJson".equals(fieldName)) { + deserializedScenarioRunProperties.scenarioRunJson = reader.getString(); + } else if ("scenarioRunSummary".equals(fieldName)) { + List scenarioRunSummary + = reader.readArray(reader1 -> ScenarioRunSummaryAction.fromJson(reader1)); + deserializedScenarioRunProperties.scenarioRunSummary = scenarioRunSummary; + } else if ("endTime".equals(fieldName)) { + deserializedScenarioRunProperties.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("zoneResolution".equals(fieldName)) { + deserializedScenarioRunProperties.zoneResolution = ZoneResolutionInfo.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedScenarioRunProperties; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunResource.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunResource.java new file mode 100644 index 000000000000..c3418f5389b5 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunResource.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Model that represents the scenario run resource. + */ +@Immutable +public final class ScenarioRunResource implements JsonSerializable { + /* + * The resource id. + */ + private String id; + + /** + * Creates an instance of ScenarioRunResource class. + */ + private ScenarioRunResource() { + } + + /** + * Get the id property: The resource id. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ScenarioRunResource from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ScenarioRunResource if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ScenarioRunResource. + */ + public static ScenarioRunResource fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ScenarioRunResource deserializedScenarioRunResource = new ScenarioRunResource(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedScenarioRunResource.id = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedScenarioRunResource; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunState.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunState.java new file mode 100644 index 000000000000..3d4645ec3e63 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunState.java @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Enum of the scenario run state. + */ +public final class ScenarioRunState extends ExpandableStringEnum { + /** + * The scenario run has been queued and is waiting to start. + */ + public static final ScenarioRunState QUEUED = fromString("Queued"); + + /** + * The scenario run is in the process of being resolved. + */ + public static final ScenarioRunState RESOLVING = fromString("Resolving"); + + /** + * The scenario run is in the process of being generated. + */ + public static final ScenarioRunState GENERATING = fromString("Generating"); + + /** + * The scenario run is in the process of being validated. + */ + public static final ScenarioRunState VALIDATING = fromString("Validating"); + + /** + * The scenario run validation has completed successfully. + */ + public static final ScenarioRunState VALIDATION_SUCCEEDED = fromString("ValidationSucceeded"); + + /** + * The scenario run is in the process of being started. + */ + public static final ScenarioRunState STARTING = fromString("Starting"); + + /** + * The scenario run is in the process of being prepared. + */ + public static final ScenarioRunState PREPARING = fromString("Preparing"); + + /** + * The scenario run is in the process of running. + */ + public static final ScenarioRunState RUNNING = fromString("Running"); + + /** + * The scenario run is in the process of being cleaned up. + */ + public static final ScenarioRunState CLEANING_UP = fromString("CleaningUp"); + + /** + * The scenario run is in the process of being canceled. + */ + public static final ScenarioRunState CANCELING = fromString("Canceling"); + + /** + * The scenario run has been canceled. + */ + public static final ScenarioRunState CANCELED = fromString("Canceled"); + + /** + * The scenario run has completed successfully. + */ + public static final ScenarioRunState SUCCEEDED = fromString("Succeeded"); + + /** + * The scenario run has failed. + */ + public static final ScenarioRunState FAILED = fromString("Failed"); + + /** + * Creates a new instance of ScenarioRunState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ScenarioRunState() { + } + + /** + * Creates or finds a ScenarioRunState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ScenarioRunState. + */ + public static ScenarioRunState fromString(String name) { + return fromString(name, ScenarioRunState.class); + } + + /** + * Gets known ScenarioRunState values. + * + * @return known ScenarioRunState values. + */ + public static Collection values() { + return values(ScenarioRunState.class); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunSummaryAction.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunSummaryAction.java new file mode 100644 index 000000000000..a49ba9a0114c --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunSummaryAction.java @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * Model that represents the scenario run action. + */ +@Immutable +public final class ScenarioRunSummaryAction implements JsonSerializable { + /* + * The resources associated with the specified action. + */ + private List resources; + + /* + * The urn for the given chaos action. + */ + private String actionUrn; + + /* + * The state of the action. + */ + private ScenarioSummaryState state; + + /* + * When the action was started. + */ + private OffsetDateTime startedAt; + + /* + * When the action was completed. + */ + private OffsetDateTime completedAt; + + /** + * Creates an instance of ScenarioRunSummaryAction class. + */ + private ScenarioRunSummaryAction() { + } + + /** + * Get the resources property: The resources associated with the specified action. + * + * @return the resources value. + */ + public List resources() { + return this.resources; + } + + /** + * Get the actionUrn property: The urn for the given chaos action. + * + * @return the actionUrn value. + */ + public String actionUrn() { + return this.actionUrn; + } + + /** + * Get the state property: The state of the action. + * + * @return the state value. + */ + public ScenarioSummaryState state() { + return this.state; + } + + /** + * Get the startedAt property: When the action was started. + * + * @return the startedAt value. + */ + public OffsetDateTime startedAt() { + return this.startedAt; + } + + /** + * Get the completedAt property: When the action was completed. + * + * @return the completedAt value. + */ + public OffsetDateTime completedAt() { + return this.completedAt; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ScenarioRunSummaryAction from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ScenarioRunSummaryAction if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ScenarioRunSummaryAction. + */ + public static ScenarioRunSummaryAction fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ScenarioRunSummaryAction deserializedScenarioRunSummaryAction = new ScenarioRunSummaryAction(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resources".equals(fieldName)) { + List resources + = reader.readArray(reader1 -> ScenarioRunResource.fromJson(reader1)); + deserializedScenarioRunSummaryAction.resources = resources; + } else if ("actionUrn".equals(fieldName)) { + deserializedScenarioRunSummaryAction.actionUrn = reader.getString(); + } else if ("state".equals(fieldName)) { + deserializedScenarioRunSummaryAction.state = ScenarioSummaryState.fromString(reader.getString()); + } else if ("startedAt".equals(fieldName)) { + deserializedScenarioRunSummaryAction.startedAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("completedAt".equals(fieldName)) { + deserializedScenarioRunSummaryAction.completedAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedScenarioRunSummaryAction; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRuns.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRuns.java new file mode 100644 index 000000000000..bcc8aafb627e --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRuns.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of ScenarioRuns. + */ +public interface ScenarioRuns { + /** + * Get a scenario run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param runId The name of the ScenarioRun. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a scenario run. + */ + Response getWithResponse(String resourceGroupName, String workspaceName, String scenarioName, + String runId, Context context); + + /** + * Get a scenario run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param runId The name of the ScenarioRun. + * @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 scenario run. + */ + ScenarioRun get(String resourceGroupName, String workspaceName, String scenarioName, String runId); + + /** + * Get a list of scenario runs. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @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 scenario runs as paginated response with {@link PagedIterable}. + */ + PagedIterable listAll(String resourceGroupName, String workspaceName, String scenarioName); + + /** + * Get a list of scenario runs. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of scenario runs as paginated response with {@link PagedIterable}. + */ + PagedIterable listAll(String resourceGroupName, String workspaceName, String scenarioName, + Context context); + + /** + * Cancel the currently running scenario execution. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param runId The name of the ScenarioRun. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + ScenarioRunsCancelResponse cancelWithResponse(String resourceGroupName, String workspaceName, String scenarioName, + String runId, Context context); + + /** + * Cancel the currently running scenario execution. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param runId The name of the ScenarioRun. + * @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. + */ + void cancel(String resourceGroupName, String workspaceName, String scenarioName, String runId); +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunsCancelHeaders.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunsCancelHeaders.java new file mode 100644 index 000000000000..59474bd08c4b --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunsCancelHeaders.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpHeaders; + +/** + * The ScenarioRunsCancelHeaders model. + */ +@Immutable +public final class ScenarioRunsCancelHeaders { + /* + * The Location property. + */ + private final String location; + + /* + * The Retry-After property. + */ + private final Integer retryAfter; + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of ScenarioRunsCancelHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public ScenarioRunsCancelHeaders(HttpHeaders rawHeaders) { + this.location = rawHeaders.getValue(HttpHeaderName.LOCATION); + String retryAfter = rawHeaders.getValue(HttpHeaderName.RETRY_AFTER); + if (retryAfter != null) { + this.retryAfter = Integer.parseInt(retryAfter); + } else { + this.retryAfter = null; + } + } + + /** + * Get the location property: The Location property. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Get the retryAfter property: The Retry-After property. + * + * @return the retryAfter value. + */ + public Integer retryAfter() { + return this.retryAfter; + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunsCancelResponse.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunsCancelResponse.java new file mode 100644 index 000000000000..c2f81e5379f6 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunsCancelResponse.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** + * Contains all response data for the cancel operation. + */ +public final class ScenarioRunsCancelResponse extends ResponseBase { + /** + * Creates an instance of ScenarioRunsCancelResponse. + * + * @param request the request which resulted in this ScenarioRunsCancelResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public ScenarioRunsCancelResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, Void value, + ScenarioRunsCancelHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunsGetHeaders.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunsGetHeaders.java new file mode 100644 index 000000000000..45e000205879 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunsGetHeaders.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpHeaders; + +/** + * The ScenarioRunsGetHeaders model. + */ +@Immutable +public final class ScenarioRunsGetHeaders { + /* + * The Location property. + */ + private final String location; + + /* + * The Retry-After property. + */ + private final Integer retryAfter; + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of ScenarioRunsGetHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public ScenarioRunsGetHeaders(HttpHeaders rawHeaders) { + this.location = rawHeaders.getValue(HttpHeaderName.LOCATION); + String retryAfter = rawHeaders.getValue(HttpHeaderName.RETRY_AFTER); + if (retryAfter != null) { + this.retryAfter = Integer.parseInt(retryAfter); + } else { + this.retryAfter = null; + } + } + + /** + * Get the location property: The Location property. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Get the retryAfter property: The Retry-After property. + * + * @return the retryAfter value. + */ + public Integer retryAfter() { + return this.retryAfter; + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunsGetResponse.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunsGetResponse.java new file mode 100644 index 000000000000..ab47917d5b07 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunsGetResponse.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; +import com.azure.resourcemanager.chaos.fluent.models.ScenarioRunInner; + +/** + * Contains all response data for the get operation. + */ +public final class ScenarioRunsGetResponse extends ResponseBase { + /** + * Creates an instance of ScenarioRunsGetResponse. + * + * @param request the request which resulted in this ScenarioRunsGetResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public ScenarioRunsGetResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, ScenarioRunInner value, + ScenarioRunsGetHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } + + /** + * Gets the deserialized response body. + * + * @return the deserialized response body. + */ + @Override + public ScenarioRunInner getValue() { + return super.getValue(); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioSummaryState.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioSummaryState.java new file mode 100644 index 000000000000..6f03e2f62896 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioSummaryState.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Enum of the scenario run summary action state. + */ +public final class ScenarioSummaryState extends ExpandableStringEnum { + /** + * The action is pending and has not started. + */ + public static final ScenarioSummaryState PENDING = fromString("Pending"); + + /** + * The action is in the process of starting. + */ + public static final ScenarioSummaryState STARTING = fromString("Starting"); + + /** + * The action is in the process of running. + */ + public static final ScenarioSummaryState RUNNING = fromString("Running"); + + /** + * The action is in the process of stopping. + */ + public static final ScenarioSummaryState STOPPING = fromString("Stopping"); + + /** + * The action has completed successfully. + */ + public static final ScenarioSummaryState SUCCEEDED = fromString("Succeeded"); + + /** + * The action is in the process of being canceled. + */ + public static final ScenarioSummaryState CANCELING = fromString("Canceling"); + + /** + * The action has been canceled. + */ + public static final ScenarioSummaryState CANCELED = fromString("Canceled"); + + /** + * The action is failing due to an error. + */ + public static final ScenarioSummaryState FAILING_ON_ERROR = fromString("FailingOnError"); + + /** + * The action has failed. + */ + public static final ScenarioSummaryState FAILED = fromString("Failed"); + + /** + * The action was skipped. + */ + public static final ScenarioSummaryState SKIPPED = fromString("Skipped"); + + /** + * Creates a new instance of ScenarioSummaryState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ScenarioSummaryState() { + } + + /** + * Creates or finds a ScenarioSummaryState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ScenarioSummaryState. + */ + public static ScenarioSummaryState fromString(String name) { + return fromString(name, ScenarioSummaryState.class); + } + + /** + * Gets known ScenarioSummaryState values. + * + * @return known ScenarioSummaryState values. + */ + public static Collection values() { + return values(ScenarioSummaryState.class); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioValidationState.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioValidationState.java new file mode 100644 index 000000000000..51691c94cd3a --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioValidationState.java @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Enum of the scenario validation state. + */ +public final class ScenarioValidationState extends ExpandableStringEnum { + /** + * The scenario validation is in a resolving state. + */ + public static final ScenarioValidationState RESOLVING = fromString("Resolving"); + + /** + * The scenario validation is in a generating state. + */ + public static final ScenarioValidationState GENERATING = fromString("Generating"); + + /** + * The scenario validation is in a validating state. + */ + public static final ScenarioValidationState VALIDATING = fromString("Validating"); + + /** + * The scenario validation has been accepted. + */ + public static final ScenarioValidationState ACCEPTED = fromString("Accepted"); + + /** + * The scenario validation has not yet started. + */ + public static final ScenarioValidationState NOT_STARTED = fromString("NotStarted"); + + /** + * The scenario validation reflects a state that requires attention. + * This is a terminal failure state indicating validation issues were found. + */ + public static final ScenarioValidationState REQUIRES_ATTENTION = fromString("RequiresAttention"); + + /** + * The scenario validation found no valid resources to perform fault behaviors against. + * This is a terminal failure state. + */ + public static final ScenarioValidationState NO_RESOLVED_RESOURCES = fromString("NoResolvedResources"); + + /** + * The scenario validation completed successfully and the scenario is ready to execute. + */ + public static final ScenarioValidationState SUCCEEDED = fromString("Succeeded"); + + /** + * Creates a new instance of ScenarioValidationState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ScenarioValidationState() { + } + + /** + * Creates or finds a ScenarioValidationState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ScenarioValidationState. + */ + public static ScenarioValidationState fromString(String name) { + return fromString(name, ScenarioValidationState.class); + } + + /** + * Gets known ScenarioValidationState values. + * + * @return known ScenarioValidationState values. + */ + public static Collection values() { + return values(ScenarioValidationState.class); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Scenarios.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Scenarios.java new file mode 100644 index 000000000000..c9be71546916 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Scenarios.java @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of Scenarios. + */ +public interface Scenarios { + /** + * Get a scenario. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a scenario along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String workspaceName, String scenarioName, + Context context); + + /** + * Get a scenario. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @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 scenario. + */ + Scenario get(String resourceGroupName, String workspaceName, String scenarioName); + + /** + * Delete a scenario. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteWithResponse(String resourceGroupName, String workspaceName, String scenarioName, + Context context); + + /** + * Delete a scenario. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param scenarioName Name of the scenario. + * @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. + */ + void delete(String resourceGroupName, String workspaceName, String scenarioName); + + /** + * Get a list of scenarios. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace 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 scenarios as paginated response with {@link PagedIterable}. + */ + PagedIterable listAll(String resourceGroupName, String workspaceName); + + /** + * Get a list of scenarios. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of scenarios as paginated response with {@link PagedIterable}. + */ + PagedIterable listAll(String resourceGroupName, String workspaceName, Context context); + + /** + * Get a scenario. + * + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a scenario along with {@link Response}. + */ + Scenario getById(String id); + + /** + * Get a scenario. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a scenario along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a scenario. + * + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete a scenario. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new Scenario resource. + * + * @param name resource name. + * @return the first stage of the new Scenario definition. + */ + Scenario.DefinitionStages.Blank define(String name); +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Validation.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Validation.java new file mode 100644 index 000000000000..05b7eee05de7 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Validation.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Concrete proxy resource types can be created by aliasing this type using a specific property type. + */ +@Immutable +public final class Validation extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + private ValidationProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of Validation class. + */ + private Validation() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ValidationProperties properties() { + return this.properties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Validation from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Validation if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the Validation. + */ + public static Validation fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Validation deserializedValidation = new Validation(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedValidation.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedValidation.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedValidation.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedValidation.properties = ValidationProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedValidation.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedValidation; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ValidationProperties.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ValidationProperties.java new file mode 100644 index 000000000000..5e8f8a46fab9 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ValidationProperties.java @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * Model that represents the properties of the scenario validation. + */ +@Immutable +public final class ValidationProperties implements JsonSerializable { + /* + * The scenario validation status. + */ + private ScenarioValidationState status; + + /* + * The scenario validation UTC start time. + */ + private OffsetDateTime startTime; + + /* + * Execution plan created from validation. This plan will be executed as-is on next scenario execution. + */ + private String executionPlanJson; + + /* + * The scenario validation UTC end time. + */ + private OffsetDateTime endTime; + + /* + * System or infrastructure errors encountered during validation. + */ + private List errors; + + /* + * Business errors from validation — permission and resource state issues. + */ + private ScenarioErrors validationErrors; + + /** + * Creates an instance of ValidationProperties class. + */ + private ValidationProperties() { + } + + /** + * Get the status property: The scenario validation status. + * + * @return the status value. + */ + public ScenarioValidationState status() { + return this.status; + } + + /** + * Get the startTime property: The scenario validation UTC start time. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Get the executionPlanJson property: Execution plan created from validation. This plan will be executed as-is on + * next scenario execution. + * + * @return the executionPlanJson value. + */ + public String executionPlanJson() { + return this.executionPlanJson; + } + + /** + * Get the endTime property: The scenario validation UTC end time. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Get the errors property: System or infrastructure errors encountered during validation. + * + * @return the errors value. + */ + public List errors() { + return this.errors; + } + + /** + * Get the validationErrors property: Business errors from validation — permission and resource state issues. + * + * @return the validationErrors value. + */ + public ScenarioErrors validationErrors() { + return this.validationErrors; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("executionPlanJson", this.executionPlanJson); + jsonWriter.writeJsonField("validationErrors", this.validationErrors); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ValidationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ValidationProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ValidationProperties. + */ + public static ValidationProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ValidationProperties deserializedValidationProperties = new ValidationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedValidationProperties.status = ScenarioValidationState.fromString(reader.getString()); + } else if ("startTime".equals(fieldName)) { + deserializedValidationProperties.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("executionPlanJson".equals(fieldName)) { + deserializedValidationProperties.executionPlanJson = reader.getString(); + } else if ("endTime".equals(fieldName)) { + deserializedValidationProperties.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("errors".equals(fieldName)) { + List errors = reader.readArray(reader1 -> OperationError.fromJson(reader1)); + deserializedValidationProperties.errors = errors; + } else if ("validationErrors".equals(fieldName)) { + deserializedValidationProperties.validationErrors = ScenarioErrors.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedValidationProperties; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Workspace.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Workspace.java new file mode 100644 index 000000000000..af8945300ef8 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Workspace.java @@ -0,0 +1,305 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.chaos.fluent.models.WorkspaceInner; +import java.util.Map; + +/** + * An immutable client-side representation of Workspace. + */ +public interface Workspace { + /** + * 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 identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + ResourceIdentity identity(); + + /** + * Gets the properties property: The properties of the Workspace resource. + * + * @return the properties value. + */ + WorkspaceProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * 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.WorkspaceInner object. + * + * @return the inner object. + */ + WorkspaceInner innerModel(); + + /** + * The entirety of the Workspace definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithProperties, DefinitionStages.WithCreate { + } + + /** + * The Workspace definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the Workspace definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the Workspace 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. + */ + WithResourceGroup withRegion(Region location); + + /** + * 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 Workspace definition allowing to specify parent resource. + */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the next definition stage. + */ + WithProperties withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the Workspace definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The properties of the Workspace resource.. + * + * @param properties The properties of the Workspace resource. + * @return the next definition stage. + */ + WithCreate withProperties(WorkspaceProperties properties); + } + + /** + * The stage of the Workspace definition which contains all the minimum required properties for the resource to + * be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity { + /** + * Executes the create request. + * + * @return the created resource. + */ + Workspace create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + Workspace create(Context context); + } + + /** + * The stage of the Workspace 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 Workspace definition allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: The managed service identities assigned to this resource.. + * + * @param identity The managed service identities assigned to this resource. + * @return the next definition stage. + */ + WithCreate withIdentity(ResourceIdentity identity); + } + } + + /** + * Begins update for the Workspace resource. + * + * @return the stage of resource update. + */ + Workspace.Update update(); + + /** + * The template for Workspace update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity { + /** + * Executes the update request. + * + * @return the updated resource. + */ + Workspace apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + Workspace apply(Context context); + } + + /** + * The Workspace update stages. + */ + interface UpdateStages { + /** + * The stage of the Workspace update allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + + /** + * The stage of the Workspace update allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: The managed service identities assigned to this resource.. + * + * @param identity The managed service identities assigned to this resource. + * @return the next definition stage. + */ + Update withIdentity(ResourceIdentity identity); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + Workspace refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + Workspace refresh(Context context); + + /** + * Refreshes recommendation status for all scenarios in a given workspace. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + WorkspaceEvaluation refreshRecommendations(); + + /** + * Refreshes recommendation status for all scenarios in a given workspace. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + WorkspaceEvaluation refreshRecommendations(Context context); +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/WorkspaceEvaluation.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/WorkspaceEvaluation.java new file mode 100644 index 000000000000..d952dc95b80d --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/WorkspaceEvaluation.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Model that represents the latest workspace evaluation result. + */ +@Immutable +public final class WorkspaceEvaluation extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + private WorkspaceEvaluationProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of WorkspaceEvaluation class. + */ + private WorkspaceEvaluation() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public WorkspaceEvaluationProperties properties() { + return this.properties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WorkspaceEvaluation from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkspaceEvaluation if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the WorkspaceEvaluation. + */ + public static WorkspaceEvaluation fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkspaceEvaluation deserializedWorkspaceEvaluation = new WorkspaceEvaluation(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedWorkspaceEvaluation.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedWorkspaceEvaluation.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedWorkspaceEvaluation.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedWorkspaceEvaluation.properties = WorkspaceEvaluationProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedWorkspaceEvaluation.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedWorkspaceEvaluation; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/WorkspaceEvaluationProperties.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/WorkspaceEvaluationProperties.java new file mode 100644 index 000000000000..80a6e7d1a83e --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/WorkspaceEvaluationProperties.java @@ -0,0 +1,249 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * Model that represents the properties of the workspace evaluation. + */ +@Immutable +public final class WorkspaceEvaluationProperties implements JsonSerializable { + /* + * The evaluation status. + */ + private WorkspaceEvaluationStatus status; + + /* + * The evaluation UTC start time. + */ + private OffsetDateTime startTime; + + /* + * The evaluation UTC end time. + */ + private OffsetDateTime endTime; + + /* + * System or infrastructure errors encountered during evaluation. + */ + private List errors; + + /* + * The workspace ID this evaluation belongs to. + */ + private String workspaceId; + + /* + * The number of scenarios to evaluate. + */ + private Integer numScenariosToEvaluate; + + /* + * The number of scenarios that evaluated successfully. + */ + private Integer numScenariosEvaluatedSucceeded; + + /* + * The number of scenarios that failed evaluation. + */ + private Integer numScenariosEvaluatedFailed; + + /* + * The number of scenarios that were cancelled during evaluation. + */ + private Integer numScenariosEvaluatedCancelled; + + /* + * The overall evaluation result. + */ + private RecommendationStatus evaluationResult; + + /* + * Per-scenario evaluation results. + */ + private List results; + + /** + * Creates an instance of WorkspaceEvaluationProperties class. + */ + private WorkspaceEvaluationProperties() { + } + + /** + * Get the status property: The evaluation status. + * + * @return the status value. + */ + public WorkspaceEvaluationStatus status() { + return this.status; + } + + /** + * Get the startTime property: The evaluation UTC start time. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Get the endTime property: The evaluation UTC end time. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Get the errors property: System or infrastructure errors encountered during evaluation. + * + * @return the errors value. + */ + public List errors() { + return this.errors; + } + + /** + * Get the workspaceId property: The workspace ID this evaluation belongs to. + * + * @return the workspaceId value. + */ + public String workspaceId() { + return this.workspaceId; + } + + /** + * Get the numScenariosToEvaluate property: The number of scenarios to evaluate. + * + * @return the numScenariosToEvaluate value. + */ + public Integer numScenariosToEvaluate() { + return this.numScenariosToEvaluate; + } + + /** + * Get the numScenariosEvaluatedSucceeded property: The number of scenarios that evaluated successfully. + * + * @return the numScenariosEvaluatedSucceeded value. + */ + public Integer numScenariosEvaluatedSucceeded() { + return this.numScenariosEvaluatedSucceeded; + } + + /** + * Get the numScenariosEvaluatedFailed property: The number of scenarios that failed evaluation. + * + * @return the numScenariosEvaluatedFailed value. + */ + public Integer numScenariosEvaluatedFailed() { + return this.numScenariosEvaluatedFailed; + } + + /** + * Get the numScenariosEvaluatedCancelled property: The number of scenarios that were cancelled during evaluation. + * + * @return the numScenariosEvaluatedCancelled value. + */ + public Integer numScenariosEvaluatedCancelled() { + return this.numScenariosEvaluatedCancelled; + } + + /** + * Get the evaluationResult property: The overall evaluation result. + * + * @return the evaluationResult value. + */ + public RecommendationStatus evaluationResult() { + return this.evaluationResult; + } + + /** + * Get the results property: Per-scenario evaluation results. + * + * @return the results value. + */ + public List results() { + return this.results; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WorkspaceEvaluationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkspaceEvaluationProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the WorkspaceEvaluationProperties. + */ + public static WorkspaceEvaluationProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkspaceEvaluationProperties deserializedWorkspaceEvaluationProperties + = new WorkspaceEvaluationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedWorkspaceEvaluationProperties.status + = WorkspaceEvaluationStatus.fromString(reader.getString()); + } else if ("workspaceId".equals(fieldName)) { + deserializedWorkspaceEvaluationProperties.workspaceId = reader.getString(); + } else if ("startTime".equals(fieldName)) { + deserializedWorkspaceEvaluationProperties.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("endTime".equals(fieldName)) { + deserializedWorkspaceEvaluationProperties.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("errors".equals(fieldName)) { + List errors = reader.readArray(reader1 -> OperationError.fromJson(reader1)); + deserializedWorkspaceEvaluationProperties.errors = errors; + } else if ("numScenariosToEvaluate".equals(fieldName)) { + deserializedWorkspaceEvaluationProperties.numScenariosToEvaluate + = reader.getNullable(JsonReader::getInt); + } else if ("numScenariosEvaluatedSucceeded".equals(fieldName)) { + deserializedWorkspaceEvaluationProperties.numScenariosEvaluatedSucceeded + = reader.getNullable(JsonReader::getInt); + } else if ("numScenariosEvaluatedFailed".equals(fieldName)) { + deserializedWorkspaceEvaluationProperties.numScenariosEvaluatedFailed + = reader.getNullable(JsonReader::getInt); + } else if ("numScenariosEvaluatedCancelled".equals(fieldName)) { + deserializedWorkspaceEvaluationProperties.numScenariosEvaluatedCancelled + = reader.getNullable(JsonReader::getInt); + } else if ("evaluationResult".equals(fieldName)) { + deserializedWorkspaceEvaluationProperties.evaluationResult + = RecommendationStatus.fromString(reader.getString()); + } else if ("results".equals(fieldName)) { + List results + = reader.readArray(reader1 -> ScenarioEvaluationResultItem.fromJson(reader1)); + deserializedWorkspaceEvaluationProperties.results = results; + } else { + reader.skipChildren(); + } + } + + return deserializedWorkspaceEvaluationProperties; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/WorkspaceEvaluationStatus.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/WorkspaceEvaluationStatus.java new file mode 100644 index 000000000000..73dec37cd7e3 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/WorkspaceEvaluationStatus.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Enum of the workspace evaluation status. + */ +public final class WorkspaceEvaluationStatus extends ExpandableStringEnum { + /** + * The evaluation is pending and has not started. + */ + public static final WorkspaceEvaluationStatus PENDING = fromString("Pending"); + + /** + * The evaluation has been accepted and is queued for execution. + */ + public static final WorkspaceEvaluationStatus QUEUED = fromString("Queued"); + + /** + * The evaluation is in progress. + */ + public static final WorkspaceEvaluationStatus IN_PROGRESS = fromString("InProgress"); + + /** + * The evaluation completed successfully. + */ + public static final WorkspaceEvaluationStatus SUCCEEDED = fromString("Succeeded"); + + /** + * The evaluation partially succeeded — some scenarios succeeded while others failed. + */ + public static final WorkspaceEvaluationStatus PARTIALLY_SUCCEEDED = fromString("PartiallySucceeded"); + + /** + * The evaluation failed. + */ + public static final WorkspaceEvaluationStatus FAILED = fromString("Failed"); + + /** + * The evaluation was canceled. + */ + public static final WorkspaceEvaluationStatus CANCELED = fromString("Canceled"); + + /** + * Creates a new instance of WorkspaceEvaluationStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public WorkspaceEvaluationStatus() { + } + + /** + * Creates or finds a WorkspaceEvaluationStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding WorkspaceEvaluationStatus. + */ + public static WorkspaceEvaluationStatus fromString(String name) { + return fromString(name, WorkspaceEvaluationStatus.class); + } + + /** + * Gets known WorkspaceEvaluationStatus values. + * + * @return known WorkspaceEvaluationStatus values. + */ + public static Collection values() { + return values(WorkspaceEvaluationStatus.class); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/WorkspaceProperties.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/WorkspaceProperties.java new file mode 100644 index 000000000000..48877233690b --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/WorkspaceProperties.java @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Model that represents the Workspace properties model. + */ +@Fluent +public final class WorkspaceProperties implements JsonSerializable { + /* + * Most recent provisioning state for the given Workspace resource. + */ + private ProvisioningState provisioningState; + + /* + * The communication endpoint used to connect and communicate with the workspace for fault-injection orchestration. + */ + private String communicationEndpoint; + + /* + * The intended workspace-level resource scope to be used by child scenarios. + */ + private List scopes; + + /** + * Creates an instance of WorkspaceProperties class. + */ + public WorkspaceProperties() { + } + + /** + * Get the provisioningState property: Most recent provisioning state for the given Workspace resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the communicationEndpoint property: The communication endpoint used to connect and communicate with the + * workspace for fault-injection orchestration. + * + * @return the communicationEndpoint value. + */ + public String communicationEndpoint() { + return this.communicationEndpoint; + } + + /** + * Get the scopes property: The intended workspace-level resource scope to be used by child scenarios. + * + * @return the scopes value. + */ + public List scopes() { + return this.scopes; + } + + /** + * Set the scopes property: The intended workspace-level resource scope to be used by child scenarios. + * + * @param scopes the scopes value to set. + * @return the WorkspaceProperties object itself. + */ + public WorkspaceProperties withScopes(List scopes) { + this.scopes = scopes; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("scopes", this.scopes, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WorkspaceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkspaceProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the WorkspaceProperties. + */ + public static WorkspaceProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkspaceProperties deserializedWorkspaceProperties = new WorkspaceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("scopes".equals(fieldName)) { + List scopes = reader.readArray(reader1 -> reader1.getString()); + deserializedWorkspaceProperties.scopes = scopes; + } else if ("provisioningState".equals(fieldName)) { + deserializedWorkspaceProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("communicationEndpoint".equals(fieldName)) { + deserializedWorkspaceProperties.communicationEndpoint = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedWorkspaceProperties; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/WorkspaceUpdate.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/WorkspaceUpdate.java new file mode 100644 index 000000000000..ee0bb5913478 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/WorkspaceUpdate.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * Describes a workspace update. + */ +@Fluent +public final class WorkspaceUpdate implements JsonSerializable { + /* + * Resource tags. + */ + private Map tags; + + /* + * The managed service identities assigned to this resource. + */ + private ResourceIdentity identity; + + /** + * Creates an instance of WorkspaceUpdate class. + */ + public WorkspaceUpdate() { + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the WorkspaceUpdate object itself. + */ + public WorkspaceUpdate withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + public ResourceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: The managed service identities assigned to this resource. + * + * @param identity the identity value to set. + * @return the WorkspaceUpdate object itself. + */ + public WorkspaceUpdate withIdentity(ResourceIdentity identity) { + this.identity = identity; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("identity", this.identity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WorkspaceUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkspaceUpdate if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the WorkspaceUpdate. + */ + public static WorkspaceUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkspaceUpdate deserializedWorkspaceUpdate = new WorkspaceUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedWorkspaceUpdate.tags = tags; + } else if ("identity".equals(fieldName)) { + deserializedWorkspaceUpdate.identity = ResourceIdentity.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedWorkspaceUpdate; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Workspaces.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Workspaces.java new file mode 100644 index 000000000000..7c65b7f3a566 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Workspaces.java @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of Workspaces. + */ +public interface Workspaces { + /** + * Get a Workspace resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Workspace resource along with {@link Response}. + */ + Response getByResourceGroupWithResponse(String resourceGroupName, String workspaceName, Context context); + + /** + * Get a Workspace resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace 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 Workspace resource. + */ + Workspace getByResourceGroup(String resourceGroupName, String workspaceName); + + /** + * Delete a Workspace resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace 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. + */ + void deleteByResourceGroup(String resourceGroupName, String workspaceName); + + /** + * Delete a Workspace resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String workspaceName, Context context); + + /** + * Get a list of Workspace resources in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Workspace resources in a resource group as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Get a list of Workspace resources in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param continuationToken String that sets the continuation token. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Workspace resources in a resource group as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, String continuationToken, Context context); + + /** + * Get a list of all Workspace 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 all Workspace resources in a subscription as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * Get a list of all Workspace resources in a subscription. + * + * @param continuationToken String that sets the continuation token. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of all Workspace resources in a subscription as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String continuationToken, Context context); + + /** + * Refreshes recommendation status for all scenarios in a given workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + WorkspaceEvaluation refreshRecommendations(String resourceGroupName, String workspaceName); + + /** + * Refreshes recommendation status for all scenarios in a given workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName String that represents a Workspace resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + WorkspaceEvaluation refreshRecommendations(String resourceGroupName, String workspaceName, Context context); + + /** + * Get a Workspace 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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Workspace resource along with {@link Response}. + */ + Workspace getById(String id); + + /** + * Get a Workspace resource. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Workspace resource along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a Workspace 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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete a Workspace resource. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new Workspace resource. + * + * @param name resource name. + * @return the first stage of the new Workspace definition. + */ + Workspace.DefinitionStages.Blank define(String name); +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ZoneResolutionInfo.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ZoneResolutionInfo.java new file mode 100644 index 000000000000..9e7c00e234be --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ZoneResolutionInfo.java @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Information about how physical zones were resolved to logical zones + * for each subscription during scenario execution. + */ +@Immutable +public final class ZoneResolutionInfo implements JsonSerializable { + /* + * The zone targeting mode used for this run. + * `logical` — customer specified logical zone identifiers directly. + * `physical` — customer specified physical zone identifiers; the system + * resolved them to per-subscription logical zones at execution time. + */ + private ZoneResolutionMode mode; + + /* + * The physical zone identifiers requested by the customer in the + * scenario configuration (e.g., `["westus2-az1"]`). + * Empty array when `mode` is `logical`. + */ + private List requestedPhysicalZones; + + /* + * Per-subscription zone resolution results. Each entry maps a subscription + * to the logical zone resolved from the requested physical zone. + * Empty when `mode` is `logical`. + */ + private List subscriptionZoneMappings; + + /** + * Creates an instance of ZoneResolutionInfo class. + */ + private ZoneResolutionInfo() { + } + + /** + * Get the mode property: The zone targeting mode used for this run. + * `logical` — customer specified logical zone identifiers directly. + * `physical` — customer specified physical zone identifiers; the system + * resolved them to per-subscription logical zones at execution time. + * + * @return the mode value. + */ + public ZoneResolutionMode mode() { + return this.mode; + } + + /** + * Get the requestedPhysicalZones property: The physical zone identifiers requested by the customer in the + * scenario configuration (e.g., `["westus2-az1"]`). + * Empty array when `mode` is `logical`. + * + * @return the requestedPhysicalZones value. + */ + public List requestedPhysicalZones() { + return this.requestedPhysicalZones; + } + + /** + * Get the subscriptionZoneMappings property: Per-subscription zone resolution results. Each entry maps a + * subscription + * to the logical zone resolved from the requested physical zone. + * Empty when `mode` is `logical`. + * + * @return the subscriptionZoneMappings value. + */ + public List subscriptionZoneMappings() { + return this.subscriptionZoneMappings; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ZoneResolutionInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ZoneResolutionInfo if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ZoneResolutionInfo. + */ + public static ZoneResolutionInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ZoneResolutionInfo deserializedZoneResolutionInfo = new ZoneResolutionInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("mode".equals(fieldName)) { + deserializedZoneResolutionInfo.mode = ZoneResolutionMode.fromString(reader.getString()); + } else if ("requestedPhysicalZones".equals(fieldName)) { + List requestedPhysicalZones = reader.readArray(reader1 -> reader1.getString()); + deserializedZoneResolutionInfo.requestedPhysicalZones = requestedPhysicalZones; + } else if ("subscriptionZoneMappings".equals(fieldName)) { + List subscriptionZoneMappings + = reader.readArray(reader1 -> ZoneResolutionMapping.fromJson(reader1)); + deserializedZoneResolutionInfo.subscriptionZoneMappings = subscriptionZoneMappings; + } else { + reader.skipChildren(); + } + } + + return deserializedZoneResolutionInfo; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ZoneResolutionMapping.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ZoneResolutionMapping.java new file mode 100644 index 000000000000..6cac64579ee5 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ZoneResolutionMapping.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Maps a single subscription to its physical-to-logical zone resolutions. + */ +@Immutable +public final class ZoneResolutionMapping implements JsonSerializable { + /* + * The subscription ID (e.g., `"6b052e15-03d3-4f17-b2e1-be7f07588291"`). + */ + private String subscriptionId; + + /* + * The physical-to-logical zone mappings for this subscription. + */ + private List zoneMappings; + + /** + * Creates an instance of ZoneResolutionMapping class. + */ + private ZoneResolutionMapping() { + } + + /** + * Get the subscriptionId property: The subscription ID (e.g., `"6b052e15-03d3-4f17-b2e1-be7f07588291"`). + * + * @return the subscriptionId value. + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Get the zoneMappings property: The physical-to-logical zone mappings for this subscription. + * + * @return the zoneMappings value. + */ + public List zoneMappings() { + return this.zoneMappings; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ZoneResolutionMapping from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ZoneResolutionMapping if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ZoneResolutionMapping. + */ + public static ZoneResolutionMapping fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ZoneResolutionMapping deserializedZoneResolutionMapping = new ZoneResolutionMapping(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("subscriptionId".equals(fieldName)) { + deserializedZoneResolutionMapping.subscriptionId = reader.getString(); + } else if ("zoneMappings".equals(fieldName)) { + List zoneMappings + = reader.readArray(reader1 -> PhysicalToLogicalZoneMapping.fromJson(reader1)); + deserializedZoneResolutionMapping.zoneMappings = zoneMappings; + } else { + reader.skipChildren(); + } + } + + return deserializedZoneResolutionMapping; + }); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ZoneResolutionMode.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ZoneResolutionMode.java new file mode 100644 index 000000000000..39dfe0cacc43 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ZoneResolutionMode.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The zone resolution mode for a scenario run. + */ +public final class ZoneResolutionMode extends ExpandableStringEnum { + /** + * Logical zone mode — customer specified logical zone identifiers directly. + */ + public static final ZoneResolutionMode LOGICAL = fromString("logical"); + + /** + * Physical zone mode — system resolved physical zones to per-subscription + * logical zones at execution time. + */ + public static final ZoneResolutionMode PHYSICAL = fromString("physical"); + + /** + * Creates a new instance of ZoneResolutionMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ZoneResolutionMode() { + } + + /** + * Creates or finds a ZoneResolutionMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding ZoneResolutionMode. + */ + public static ZoneResolutionMode fromString(String name) { + return fromString(name, ZoneResolutionMode.class); + } + + /** + * Gets known ZoneResolutionMode values. + * + * @return known ZoneResolutionMode values. + */ + public static Collection values() { + return values(ZoneResolutionMode.class); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/resources/META-INF/azure-resourcemanager-chaos_metadata.json b/sdk/chaos/azure-resourcemanager-chaos/src/main/resources/META-INF/azure-resourcemanager-chaos_metadata.json index ae836419579b..9615a60d8e67 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/resources/META-INF/azure-resourcemanager-chaos_metadata.json +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/resources/META-INF/azure-resourcemanager-chaos_metadata.json @@ -1 +1 @@ -{"flavor":"azure","apiVersions":{"Microsoft.Chaos":"2025-01-01"},"crossLanguageDefinitions":{"com.azure.resourcemanager.chaos.fluent.CapabilitiesClient":"Microsoft.Chaos.Capabilities","com.azure.resourcemanager.chaos.fluent.CapabilitiesClient.createOrUpdate":"Microsoft.Chaos.Capabilities.createOrUpdate","com.azure.resourcemanager.chaos.fluent.CapabilitiesClient.createOrUpdateWithResponse":"Microsoft.Chaos.Capabilities.createOrUpdate","com.azure.resourcemanager.chaos.fluent.CapabilitiesClient.delete":"Microsoft.Chaos.Capabilities.delete","com.azure.resourcemanager.chaos.fluent.CapabilitiesClient.deleteWithResponse":"Microsoft.Chaos.Capabilities.delete","com.azure.resourcemanager.chaos.fluent.CapabilitiesClient.get":"Microsoft.Chaos.Capabilities.get","com.azure.resourcemanager.chaos.fluent.CapabilitiesClient.getWithResponse":"Microsoft.Chaos.Capabilities.get","com.azure.resourcemanager.chaos.fluent.CapabilitiesClient.list":"Microsoft.Chaos.Capabilities.list","com.azure.resourcemanager.chaos.fluent.CapabilityTypesClient":"Microsoft.Chaos.CapabilityTypes","com.azure.resourcemanager.chaos.fluent.CapabilityTypesClient.get":"Microsoft.Chaos.CapabilityTypes.get","com.azure.resourcemanager.chaos.fluent.CapabilityTypesClient.getWithResponse":"Microsoft.Chaos.CapabilityTypes.get","com.azure.resourcemanager.chaos.fluent.CapabilityTypesClient.list":"Microsoft.Chaos.CapabilityTypes.list","com.azure.resourcemanager.chaos.fluent.ChaosManagementClient":"Microsoft.Chaos","com.azure.resourcemanager.chaos.fluent.ExperimentsClient":"Microsoft.Chaos.Experiments","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.beginCancel":"Microsoft.Chaos.Experiments.cancel","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.beginCreateOrUpdate":"Microsoft.Chaos.Experiments.createOrUpdate","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.beginDelete":"Microsoft.Chaos.Experiments.delete","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.beginStart":"Microsoft.Chaos.Experiments.start","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.beginUpdate":"Microsoft.Chaos.Experiments.update","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.cancel":"Microsoft.Chaos.Experiments.cancel","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.createOrUpdate":"Microsoft.Chaos.Experiments.createOrUpdate","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.delete":"Microsoft.Chaos.Experiments.delete","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.executionDetails":"Microsoft.Chaos.ExperimentExecutions.getExecutionDetails","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.executionDetailsWithResponse":"Microsoft.Chaos.ExperimentExecutions.getExecutionDetails","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.getByResourceGroup":"Microsoft.Chaos.Experiments.get","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.getByResourceGroupWithResponse":"Microsoft.Chaos.Experiments.get","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.getExecution":"Microsoft.Chaos.ExperimentExecutions.getExecution","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.getExecutionWithResponse":"Microsoft.Chaos.ExperimentExecutions.getExecution","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.list":"Microsoft.Chaos.Experiments.listAll","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.listAllExecutions":"Microsoft.Chaos.ExperimentExecutions.listAllExecutions","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.listByResourceGroup":"Microsoft.Chaos.Experiments.list","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.start":"Microsoft.Chaos.Experiments.start","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.update":"Microsoft.Chaos.Experiments.update","com.azure.resourcemanager.chaos.fluent.OperationStatusesClient":"Microsoft.Chaos.OperationStatuses","com.azure.resourcemanager.chaos.fluent.OperationStatusesClient.get":"Microsoft.Chaos.OperationStatuses.get","com.azure.resourcemanager.chaos.fluent.OperationStatusesClient.getWithResponse":"Microsoft.Chaos.OperationStatuses.get","com.azure.resourcemanager.chaos.fluent.OperationsClient":"Microsoft.Chaos.Operations","com.azure.resourcemanager.chaos.fluent.OperationsClient.list":"Azure.ResourceManager.Operations.list","com.azure.resourcemanager.chaos.fluent.TargetTypesClient":"Microsoft.Chaos.TargetTypes","com.azure.resourcemanager.chaos.fluent.TargetTypesClient.get":"Microsoft.Chaos.TargetTypes.get","com.azure.resourcemanager.chaos.fluent.TargetTypesClient.getWithResponse":"Microsoft.Chaos.TargetTypes.get","com.azure.resourcemanager.chaos.fluent.TargetTypesClient.list":"Microsoft.Chaos.TargetTypes.list","com.azure.resourcemanager.chaos.fluent.TargetsClient":"Microsoft.Chaos.Targets","com.azure.resourcemanager.chaos.fluent.TargetsClient.createOrUpdate":"Microsoft.Chaos.Targets.createOrUpdate","com.azure.resourcemanager.chaos.fluent.TargetsClient.createOrUpdateWithResponse":"Microsoft.Chaos.Targets.createOrUpdate","com.azure.resourcemanager.chaos.fluent.TargetsClient.delete":"Microsoft.Chaos.Targets.delete","com.azure.resourcemanager.chaos.fluent.TargetsClient.deleteWithResponse":"Microsoft.Chaos.Targets.delete","com.azure.resourcemanager.chaos.fluent.TargetsClient.get":"Microsoft.Chaos.Targets.get","com.azure.resourcemanager.chaos.fluent.TargetsClient.getWithResponse":"Microsoft.Chaos.Targets.get","com.azure.resourcemanager.chaos.fluent.TargetsClient.list":"Microsoft.Chaos.Targets.list","com.azure.resourcemanager.chaos.fluent.models.CapabilityInner":"Microsoft.Chaos.Capability","com.azure.resourcemanager.chaos.fluent.models.CapabilityProperties":"Microsoft.Chaos.CapabilityProperties","com.azure.resourcemanager.chaos.fluent.models.CapabilityTypeInner":"Microsoft.Chaos.CapabilityType","com.azure.resourcemanager.chaos.fluent.models.CapabilityTypeProperties":"Microsoft.Chaos.CapabilityTypeProperties","com.azure.resourcemanager.chaos.fluent.models.ExperimentExecutionDetailsInner":"Microsoft.Chaos.ExperimentExecutionDetails","com.azure.resourcemanager.chaos.fluent.models.ExperimentExecutionDetailsProperties":"Microsoft.Chaos.ExperimentExecutionDetailsProperties","com.azure.resourcemanager.chaos.fluent.models.ExperimentExecutionInner":"Microsoft.Chaos.ExperimentExecution","com.azure.resourcemanager.chaos.fluent.models.ExperimentExecutionProperties":"Microsoft.Chaos.ExperimentExecutionProperties","com.azure.resourcemanager.chaos.fluent.models.ExperimentInner":"Microsoft.Chaos.Experiment","com.azure.resourcemanager.chaos.fluent.models.ExperimentProperties":"Microsoft.Chaos.ExperimentProperties","com.azure.resourcemanager.chaos.fluent.models.OperationInner":"Azure.ResourceManager.CommonTypes.Operation","com.azure.resourcemanager.chaos.fluent.models.OperationStatusInner":"Azure.ResourceManager.CommonTypes.OperationStatusResult","com.azure.resourcemanager.chaos.fluent.models.TargetInner":"Microsoft.Chaos.Target","com.azure.resourcemanager.chaos.fluent.models.TargetTypeInner":"Microsoft.Chaos.TargetType","com.azure.resourcemanager.chaos.fluent.models.TargetTypeProperties":"Microsoft.Chaos.TargetTypeProperties","com.azure.resourcemanager.chaos.implementation.ChaosManagementClientBuilder":"Microsoft.Chaos","com.azure.resourcemanager.chaos.implementation.models.CapabilityListResult":"Microsoft.Chaos.CapabilityListResult","com.azure.resourcemanager.chaos.implementation.models.CapabilityTypeListResult":"Microsoft.Chaos.CapabilityTypeListResult","com.azure.resourcemanager.chaos.implementation.models.ExperimentExecutionListResult":"Microsoft.Chaos.ExperimentExecutionListResult","com.azure.resourcemanager.chaos.implementation.models.ExperimentListResult":"Microsoft.Chaos.ExperimentListResult","com.azure.resourcemanager.chaos.implementation.models.OperationListResult":"Azure.ResourceManager.CommonTypes.OperationListResult","com.azure.resourcemanager.chaos.implementation.models.TargetListResult":"Microsoft.Chaos.TargetListResult","com.azure.resourcemanager.chaos.implementation.models.TargetTypeListResult":"Microsoft.Chaos.TargetTypeListResult","com.azure.resourcemanager.chaos.models.ActionStatus":"Microsoft.Chaos.ActionStatus","com.azure.resourcemanager.chaos.models.ActionType":"Azure.ResourceManager.CommonTypes.ActionType","com.azure.resourcemanager.chaos.models.BranchStatus":"Microsoft.Chaos.BranchStatus","com.azure.resourcemanager.chaos.models.CapabilityTypePropertiesRuntimeProperties":"Microsoft.Chaos.CapabilityTypePropertiesRuntimeProperties","com.azure.resourcemanager.chaos.models.ChaosExperimentAction":"Microsoft.Chaos.ChaosExperimentAction","com.azure.resourcemanager.chaos.models.ChaosExperimentBranch":"Microsoft.Chaos.ChaosExperimentBranch","com.azure.resourcemanager.chaos.models.ChaosExperimentStep":"Microsoft.Chaos.ChaosExperimentStep","com.azure.resourcemanager.chaos.models.ChaosTargetFilter":"Microsoft.Chaos.ChaosTargetFilter","com.azure.resourcemanager.chaos.models.ChaosTargetListSelector":"Microsoft.Chaos.ChaosTargetListSelector","com.azure.resourcemanager.chaos.models.ChaosTargetQuerySelector":"Microsoft.Chaos.ChaosTargetQuerySelector","com.azure.resourcemanager.chaos.models.ChaosTargetSelector":"Microsoft.Chaos.ChaosTargetSelector","com.azure.resourcemanager.chaos.models.ChaosTargetSimpleFilter":"Microsoft.Chaos.ChaosTargetSimpleFilter","com.azure.resourcemanager.chaos.models.ChaosTargetSimpleFilterParameters":"Microsoft.Chaos.ChaosTargetSimpleFilterParameters","com.azure.resourcemanager.chaos.models.ContinuousAction":"Microsoft.Chaos.ContinuousAction","com.azure.resourcemanager.chaos.models.DelayAction":"Microsoft.Chaos.DelayAction","com.azure.resourcemanager.chaos.models.DiscreteAction":"Microsoft.Chaos.DiscreteAction","com.azure.resourcemanager.chaos.models.ExperimentActionType":"Microsoft.Chaos.ExperimentActionType","com.azure.resourcemanager.chaos.models.ExperimentExecutionActionTargetDetailsError":"Microsoft.Chaos.ExperimentExecutionActionTargetDetailsError","com.azure.resourcemanager.chaos.models.ExperimentExecutionActionTargetDetailsProperties":"Microsoft.Chaos.ExperimentExecutionActionTargetDetailsProperties","com.azure.resourcemanager.chaos.models.ExperimentExecutionDetailsPropertiesRunInformation":"Microsoft.Chaos.ExperimentExecutionDetailsPropertiesRunInformation","com.azure.resourcemanager.chaos.models.ExperimentUpdate":"Microsoft.Chaos.ExperimentUpdate","com.azure.resourcemanager.chaos.models.FilterType":"Microsoft.Chaos.FilterType","com.azure.resourcemanager.chaos.models.KeyValuePair":"Microsoft.Chaos.KeyValuePair","com.azure.resourcemanager.chaos.models.ManagedServiceIdentityType":"Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType","com.azure.resourcemanager.chaos.models.OperationDisplay":"Azure.ResourceManager.CommonTypes.OperationDisplay","com.azure.resourcemanager.chaos.models.Origin":"Azure.ResourceManager.CommonTypes.Origin","com.azure.resourcemanager.chaos.models.ProvisioningState":"Microsoft.Chaos.ProvisioningState","com.azure.resourcemanager.chaos.models.ResourceIdentity":"Azure.ResourceManager.CommonTypes.ManagedServiceIdentity","com.azure.resourcemanager.chaos.models.SelectorType":"Microsoft.Chaos.SelectorType","com.azure.resourcemanager.chaos.models.StepStatus":"Microsoft.Chaos.StepStatus","com.azure.resourcemanager.chaos.models.TargetReference":"Microsoft.Chaos.TargetReference","com.azure.resourcemanager.chaos.models.TargetReferenceType":"Microsoft.Chaos.TargetReferenceType","com.azure.resourcemanager.chaos.models.UserAssignedIdentity":"Azure.ResourceManager.CommonTypes.UserAssignedIdentity"},"generatedFiles":["src/main/java/com/azure/resourcemanager/chaos/ChaosManager.java","src/main/java/com/azure/resourcemanager/chaos/fluent/CapabilitiesClient.java","src/main/java/com/azure/resourcemanager/chaos/fluent/CapabilityTypesClient.java","src/main/java/com/azure/resourcemanager/chaos/fluent/ChaosManagementClient.java","src/main/java/com/azure/resourcemanager/chaos/fluent/ExperimentsClient.java","src/main/java/com/azure/resourcemanager/chaos/fluent/OperationStatusesClient.java","src/main/java/com/azure/resourcemanager/chaos/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/chaos/fluent/TargetTypesClient.java","src/main/java/com/azure/resourcemanager/chaos/fluent/TargetsClient.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/CapabilityInner.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/CapabilityProperties.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/CapabilityTypeInner.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/CapabilityTypeProperties.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentExecutionDetailsInner.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentExecutionDetailsProperties.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentExecutionInner.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentExecutionProperties.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentInner.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentProperties.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/OperationStatusInner.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/TargetInner.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/TargetTypeInner.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/TargetTypeProperties.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/chaos/fluent/package-info.java","src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilitiesClientImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilitiesImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilityImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilityTypeImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilityTypesClientImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilityTypesImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ChaosManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ChaosManagementClientImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentExecutionDetailsImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentExecutionImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentsClientImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentsImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/OperationImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/OperationStatusImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/OperationStatusesClientImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/OperationStatusesImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/chaos/implementation/TargetImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/TargetTypeImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/TargetTypesClientImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/TargetTypesImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/TargetsClientImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/TargetsImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/models/CapabilityListResult.java","src/main/java/com/azure/resourcemanager/chaos/implementation/models/CapabilityTypeListResult.java","src/main/java/com/azure/resourcemanager/chaos/implementation/models/ExperimentExecutionListResult.java","src/main/java/com/azure/resourcemanager/chaos/implementation/models/ExperimentListResult.java","src/main/java/com/azure/resourcemanager/chaos/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/chaos/implementation/models/TargetListResult.java","src/main/java/com/azure/resourcemanager/chaos/implementation/models/TargetTypeListResult.java","src/main/java/com/azure/resourcemanager/chaos/implementation/package-info.java","src/main/java/com/azure/resourcemanager/chaos/models/ActionStatus.java","src/main/java/com/azure/resourcemanager/chaos/models/ActionType.java","src/main/java/com/azure/resourcemanager/chaos/models/BranchStatus.java","src/main/java/com/azure/resourcemanager/chaos/models/Capabilities.java","src/main/java/com/azure/resourcemanager/chaos/models/Capability.java","src/main/java/com/azure/resourcemanager/chaos/models/CapabilityType.java","src/main/java/com/azure/resourcemanager/chaos/models/CapabilityTypePropertiesRuntimeProperties.java","src/main/java/com/azure/resourcemanager/chaos/models/CapabilityTypes.java","src/main/java/com/azure/resourcemanager/chaos/models/ChaosExperimentAction.java","src/main/java/com/azure/resourcemanager/chaos/models/ChaosExperimentBranch.java","src/main/java/com/azure/resourcemanager/chaos/models/ChaosExperimentStep.java","src/main/java/com/azure/resourcemanager/chaos/models/ChaosTargetFilter.java","src/main/java/com/azure/resourcemanager/chaos/models/ChaosTargetListSelector.java","src/main/java/com/azure/resourcemanager/chaos/models/ChaosTargetQuerySelector.java","src/main/java/com/azure/resourcemanager/chaos/models/ChaosTargetSelector.java","src/main/java/com/azure/resourcemanager/chaos/models/ChaosTargetSimpleFilter.java","src/main/java/com/azure/resourcemanager/chaos/models/ChaosTargetSimpleFilterParameters.java","src/main/java/com/azure/resourcemanager/chaos/models/ContinuousAction.java","src/main/java/com/azure/resourcemanager/chaos/models/DelayAction.java","src/main/java/com/azure/resourcemanager/chaos/models/DiscreteAction.java","src/main/java/com/azure/resourcemanager/chaos/models/Experiment.java","src/main/java/com/azure/resourcemanager/chaos/models/ExperimentActionType.java","src/main/java/com/azure/resourcemanager/chaos/models/ExperimentExecution.java","src/main/java/com/azure/resourcemanager/chaos/models/ExperimentExecutionActionTargetDetailsError.java","src/main/java/com/azure/resourcemanager/chaos/models/ExperimentExecutionActionTargetDetailsProperties.java","src/main/java/com/azure/resourcemanager/chaos/models/ExperimentExecutionDetails.java","src/main/java/com/azure/resourcemanager/chaos/models/ExperimentExecutionDetailsPropertiesRunInformation.java","src/main/java/com/azure/resourcemanager/chaos/models/ExperimentUpdate.java","src/main/java/com/azure/resourcemanager/chaos/models/Experiments.java","src/main/java/com/azure/resourcemanager/chaos/models/FilterType.java","src/main/java/com/azure/resourcemanager/chaos/models/KeyValuePair.java","src/main/java/com/azure/resourcemanager/chaos/models/ManagedServiceIdentityType.java","src/main/java/com/azure/resourcemanager/chaos/models/Operation.java","src/main/java/com/azure/resourcemanager/chaos/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/chaos/models/OperationStatus.java","src/main/java/com/azure/resourcemanager/chaos/models/OperationStatuses.java","src/main/java/com/azure/resourcemanager/chaos/models/Operations.java","src/main/java/com/azure/resourcemanager/chaos/models/Origin.java","src/main/java/com/azure/resourcemanager/chaos/models/ProvisioningState.java","src/main/java/com/azure/resourcemanager/chaos/models/ResourceIdentity.java","src/main/java/com/azure/resourcemanager/chaos/models/SelectorType.java","src/main/java/com/azure/resourcemanager/chaos/models/StepStatus.java","src/main/java/com/azure/resourcemanager/chaos/models/Target.java","src/main/java/com/azure/resourcemanager/chaos/models/TargetReference.java","src/main/java/com/azure/resourcemanager/chaos/models/TargetReferenceType.java","src/main/java/com/azure/resourcemanager/chaos/models/TargetType.java","src/main/java/com/azure/resourcemanager/chaos/models/TargetTypes.java","src/main/java/com/azure/resourcemanager/chaos/models/Targets.java","src/main/java/com/azure/resourcemanager/chaos/models/UserAssignedIdentity.java","src/main/java/com/azure/resourcemanager/chaos/models/package-info.java","src/main/java/com/azure/resourcemanager/chaos/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file +{"flavor":"azure","apiVersions":{"Microsoft.Chaos":"2026-05-01-preview"},"crossLanguageDefinitions":{"com.azure.resourcemanager.chaos.fluent.ActionVersionsClient":"Microsoft.Chaos.ActionVersions","com.azure.resourcemanager.chaos.fluent.ActionVersionsClient.get":"Microsoft.Chaos.ActionVersions.get","com.azure.resourcemanager.chaos.fluent.ActionVersionsClient.getWithResponse":"Microsoft.Chaos.ActionVersions.get","com.azure.resourcemanager.chaos.fluent.ActionVersionsClient.list":"Microsoft.Chaos.ActionVersions.list","com.azure.resourcemanager.chaos.fluent.ActionsClient":"Microsoft.Chaos.Actions","com.azure.resourcemanager.chaos.fluent.ActionsClient.get":"Microsoft.Chaos.Actions.get","com.azure.resourcemanager.chaos.fluent.ActionsClient.getWithResponse":"Microsoft.Chaos.Actions.get","com.azure.resourcemanager.chaos.fluent.ActionsClient.list":"Microsoft.Chaos.Actions.list","com.azure.resourcemanager.chaos.fluent.CapabilitiesClient":"Microsoft.Chaos.Capabilities","com.azure.resourcemanager.chaos.fluent.CapabilitiesClient.createOrUpdate":"Microsoft.Chaos.Capabilities.createOrUpdate","com.azure.resourcemanager.chaos.fluent.CapabilitiesClient.createOrUpdateWithResponse":"Microsoft.Chaos.Capabilities.createOrUpdate","com.azure.resourcemanager.chaos.fluent.CapabilitiesClient.delete":"Microsoft.Chaos.Capabilities.delete","com.azure.resourcemanager.chaos.fluent.CapabilitiesClient.deleteWithResponse":"Microsoft.Chaos.Capabilities.delete","com.azure.resourcemanager.chaos.fluent.CapabilitiesClient.get":"Microsoft.Chaos.Capabilities.get","com.azure.resourcemanager.chaos.fluent.CapabilitiesClient.getWithResponse":"Microsoft.Chaos.Capabilities.get","com.azure.resourcemanager.chaos.fluent.CapabilitiesClient.list":"Microsoft.Chaos.Capabilities.list","com.azure.resourcemanager.chaos.fluent.CapabilityTypesClient":"Microsoft.Chaos.CapabilityTypes","com.azure.resourcemanager.chaos.fluent.CapabilityTypesClient.get":"Microsoft.Chaos.CapabilityTypes.get","com.azure.resourcemanager.chaos.fluent.CapabilityTypesClient.getWithResponse":"Microsoft.Chaos.CapabilityTypes.get","com.azure.resourcemanager.chaos.fluent.CapabilityTypesClient.list":"Microsoft.Chaos.CapabilityTypes.list","com.azure.resourcemanager.chaos.fluent.ChaosManagementClient":"Microsoft.Chaos","com.azure.resourcemanager.chaos.fluent.DiscoveredResourcesClient":"Microsoft.Chaos.DiscoveredResources","com.azure.resourcemanager.chaos.fluent.DiscoveredResourcesClient.get":"Microsoft.Chaos.DiscoveredResources.get","com.azure.resourcemanager.chaos.fluent.DiscoveredResourcesClient.getWithResponse":"Microsoft.Chaos.DiscoveredResources.get","com.azure.resourcemanager.chaos.fluent.DiscoveredResourcesClient.listByWorkspace":"Microsoft.Chaos.DiscoveredResources.listByWorkspace","com.azure.resourcemanager.chaos.fluent.ExperimentsClient":"Microsoft.Chaos.Experiments","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.beginCancel":"Microsoft.Chaos.Experiments.cancel","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.beginCreateOrUpdate":"Microsoft.Chaos.Experiments.createOrUpdate","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.beginDelete":"Microsoft.Chaos.Experiments.delete","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.beginStart":"Microsoft.Chaos.Experiments.start","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.beginUpdate":"Microsoft.Chaos.Experiments.update","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.cancel":"Microsoft.Chaos.Experiments.cancel","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.createOrUpdate":"Microsoft.Chaos.Experiments.createOrUpdate","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.delete":"Microsoft.Chaos.Experiments.delete","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.executionDetails":"Microsoft.Chaos.ExperimentExecutions.getExecutionDetails","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.executionDetailsWithResponse":"Microsoft.Chaos.ExperimentExecutions.getExecutionDetails","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.getByResourceGroup":"Microsoft.Chaos.Experiments.get","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.getByResourceGroupWithResponse":"Microsoft.Chaos.Experiments.get","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.getExecution":"Microsoft.Chaos.ExperimentExecutions.getExecution","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.getExecutionWithResponse":"Microsoft.Chaos.ExperimentExecutions.getExecution","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.list":"Microsoft.Chaos.Experiments.listAll","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.listAllExecutions":"Microsoft.Chaos.ExperimentExecutions.listAllExecutions","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.listByResourceGroup":"Microsoft.Chaos.Experiments.list","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.start":"Microsoft.Chaos.Experiments.start","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.update":"Microsoft.Chaos.Experiments.update","com.azure.resourcemanager.chaos.fluent.OperationStatusesClient":"Microsoft.Chaos.OperationStatuses","com.azure.resourcemanager.chaos.fluent.OperationStatusesClient.get":"Microsoft.Chaos.OperationStatuses.get","com.azure.resourcemanager.chaos.fluent.OperationStatusesClient.getWithResponse":"Microsoft.Chaos.OperationStatuses.get","com.azure.resourcemanager.chaos.fluent.OperationsClient":"Microsoft.Chaos.Operations","com.azure.resourcemanager.chaos.fluent.OperationsClient.list":"Azure.ResourceManager.Operations.list","com.azure.resourcemanager.chaos.fluent.PrivateAccessesClient":"Microsoft.Chaos.PrivateAccesses","com.azure.resourcemanager.chaos.fluent.PrivateAccessesClient.beginCreateOrUpdate":"Microsoft.Chaos.PrivateAccesses.createOrUpdate","com.azure.resourcemanager.chaos.fluent.PrivateAccessesClient.beginDelete":"Microsoft.Chaos.PrivateAccesses.delete","com.azure.resourcemanager.chaos.fluent.PrivateAccessesClient.beginDeleteAPrivateEndpointConnection":"Microsoft.Chaos.PrivateEndpointConnections.deleteAPrivateEndpointConnection","com.azure.resourcemanager.chaos.fluent.PrivateAccessesClient.beginUpdate":"Microsoft.Chaos.PrivateAccesses.update","com.azure.resourcemanager.chaos.fluent.PrivateAccessesClient.createOrUpdate":"Microsoft.Chaos.PrivateAccesses.createOrUpdate","com.azure.resourcemanager.chaos.fluent.PrivateAccessesClient.delete":"Microsoft.Chaos.PrivateAccesses.delete","com.azure.resourcemanager.chaos.fluent.PrivateAccessesClient.deleteAPrivateEndpointConnection":"Microsoft.Chaos.PrivateEndpointConnections.deleteAPrivateEndpointConnection","com.azure.resourcemanager.chaos.fluent.PrivateAccessesClient.getAPrivateEndpointConnection":"Microsoft.Chaos.PrivateEndpointConnections.getAPrivateEndpointConnection","com.azure.resourcemanager.chaos.fluent.PrivateAccessesClient.getAPrivateEndpointConnectionWithResponse":"Microsoft.Chaos.PrivateEndpointConnections.getAPrivateEndpointConnection","com.azure.resourcemanager.chaos.fluent.PrivateAccessesClient.getByResourceGroup":"Microsoft.Chaos.PrivateAccesses.get","com.azure.resourcemanager.chaos.fluent.PrivateAccessesClient.getByResourceGroupWithResponse":"Microsoft.Chaos.PrivateAccesses.get","com.azure.resourcemanager.chaos.fluent.PrivateAccessesClient.getPrivateLinkResources":"Microsoft.Chaos.PrivateAccesses.privateLinkResources","com.azure.resourcemanager.chaos.fluent.PrivateAccessesClient.getPrivateLinkResourcesWithResponse":"Microsoft.Chaos.PrivateAccesses.privateLinkResources","com.azure.resourcemanager.chaos.fluent.PrivateAccessesClient.list":"Microsoft.Chaos.PrivateAccesses.listAll","com.azure.resourcemanager.chaos.fluent.PrivateAccessesClient.listByResourceGroup":"Microsoft.Chaos.PrivateAccesses.list","com.azure.resourcemanager.chaos.fluent.PrivateAccessesClient.listPrivateEndpointConnections":"Microsoft.Chaos.PrivateEndpointConnections.listPrivateEndpointConnections","com.azure.resourcemanager.chaos.fluent.PrivateAccessesClient.update":"Microsoft.Chaos.PrivateAccesses.update","com.azure.resourcemanager.chaos.fluent.ScenarioConfigurationsClient":"Microsoft.Chaos.ScenarioConfigurations","com.azure.resourcemanager.chaos.fluent.ScenarioConfigurationsClient.beginCreateOrUpdate":"Microsoft.Chaos.ScenarioConfigurations.createOrUpdate","com.azure.resourcemanager.chaos.fluent.ScenarioConfigurationsClient.beginDelete":"Microsoft.Chaos.ScenarioConfigurations.delete","com.azure.resourcemanager.chaos.fluent.ScenarioConfigurationsClient.beginFixResourcePermissions":"Microsoft.Chaos.ScenarioConfigurations.fixResourcePermissions","com.azure.resourcemanager.chaos.fluent.ScenarioConfigurationsClient.beginValidate":"Microsoft.Chaos.ScenarioConfigurations.validate","com.azure.resourcemanager.chaos.fluent.ScenarioConfigurationsClient.createOrUpdate":"Microsoft.Chaos.ScenarioConfigurations.createOrUpdate","com.azure.resourcemanager.chaos.fluent.ScenarioConfigurationsClient.delete":"Microsoft.Chaos.ScenarioConfigurations.delete","com.azure.resourcemanager.chaos.fluent.ScenarioConfigurationsClient.execute":"Microsoft.Chaos.ScenarioConfigurations.execute","com.azure.resourcemanager.chaos.fluent.ScenarioConfigurationsClient.executeWithResponse":"Microsoft.Chaos.ScenarioConfigurations.execute","com.azure.resourcemanager.chaos.fluent.ScenarioConfigurationsClient.fixResourcePermissions":"Microsoft.Chaos.ScenarioConfigurations.fixResourcePermissions","com.azure.resourcemanager.chaos.fluent.ScenarioConfigurationsClient.get":"Microsoft.Chaos.ScenarioConfigurations.get","com.azure.resourcemanager.chaos.fluent.ScenarioConfigurationsClient.getWithResponse":"Microsoft.Chaos.ScenarioConfigurations.get","com.azure.resourcemanager.chaos.fluent.ScenarioConfigurationsClient.listAll":"Microsoft.Chaos.ScenarioConfigurations.listAll","com.azure.resourcemanager.chaos.fluent.ScenarioConfigurationsClient.validate":"Microsoft.Chaos.ScenarioConfigurations.validate","com.azure.resourcemanager.chaos.fluent.ScenarioRunsClient":"Microsoft.Chaos.ScenarioRuns","com.azure.resourcemanager.chaos.fluent.ScenarioRunsClient.cancel":"Microsoft.Chaos.ScenarioRuns.cancel","com.azure.resourcemanager.chaos.fluent.ScenarioRunsClient.cancelWithResponse":"Microsoft.Chaos.ScenarioRuns.cancel","com.azure.resourcemanager.chaos.fluent.ScenarioRunsClient.get":"Microsoft.Chaos.ScenarioRuns.get","com.azure.resourcemanager.chaos.fluent.ScenarioRunsClient.getWithResponse":"Microsoft.Chaos.ScenarioRuns.get","com.azure.resourcemanager.chaos.fluent.ScenarioRunsClient.listAll":"Microsoft.Chaos.ScenarioRuns.listAll","com.azure.resourcemanager.chaos.fluent.ScenariosClient":"Microsoft.Chaos.Scenarios","com.azure.resourcemanager.chaos.fluent.ScenariosClient.createOrUpdate":"Microsoft.Chaos.Scenarios.createOrUpdate","com.azure.resourcemanager.chaos.fluent.ScenariosClient.createOrUpdateWithResponse":"Microsoft.Chaos.Scenarios.createOrUpdate","com.azure.resourcemanager.chaos.fluent.ScenariosClient.delete":"Microsoft.Chaos.Scenarios.delete","com.azure.resourcemanager.chaos.fluent.ScenariosClient.deleteWithResponse":"Microsoft.Chaos.Scenarios.delete","com.azure.resourcemanager.chaos.fluent.ScenariosClient.get":"Microsoft.Chaos.Scenarios.get","com.azure.resourcemanager.chaos.fluent.ScenariosClient.getWithResponse":"Microsoft.Chaos.Scenarios.get","com.azure.resourcemanager.chaos.fluent.ScenariosClient.listAll":"Microsoft.Chaos.Scenarios.listAll","com.azure.resourcemanager.chaos.fluent.TargetTypesClient":"Microsoft.Chaos.TargetTypes","com.azure.resourcemanager.chaos.fluent.TargetTypesClient.get":"Microsoft.Chaos.TargetTypes.get","com.azure.resourcemanager.chaos.fluent.TargetTypesClient.getWithResponse":"Microsoft.Chaos.TargetTypes.get","com.azure.resourcemanager.chaos.fluent.TargetTypesClient.list":"Microsoft.Chaos.TargetTypes.list","com.azure.resourcemanager.chaos.fluent.TargetsClient":"Microsoft.Chaos.Targets","com.azure.resourcemanager.chaos.fluent.TargetsClient.createOrUpdate":"Microsoft.Chaos.Targets.createOrUpdate","com.azure.resourcemanager.chaos.fluent.TargetsClient.createOrUpdateWithResponse":"Microsoft.Chaos.Targets.createOrUpdate","com.azure.resourcemanager.chaos.fluent.TargetsClient.delete":"Microsoft.Chaos.Targets.delete","com.azure.resourcemanager.chaos.fluent.TargetsClient.deleteWithResponse":"Microsoft.Chaos.Targets.delete","com.azure.resourcemanager.chaos.fluent.TargetsClient.get":"Microsoft.Chaos.Targets.get","com.azure.resourcemanager.chaos.fluent.TargetsClient.getWithResponse":"Microsoft.Chaos.Targets.get","com.azure.resourcemanager.chaos.fluent.TargetsClient.list":"Microsoft.Chaos.Targets.list","com.azure.resourcemanager.chaos.fluent.WorkspacesClient":"Microsoft.Chaos.Workspaces","com.azure.resourcemanager.chaos.fluent.WorkspacesClient.beginCreateOrUpdate":"Microsoft.Chaos.Workspaces.createOrUpdate","com.azure.resourcemanager.chaos.fluent.WorkspacesClient.beginDelete":"Microsoft.Chaos.Workspaces.delete","com.azure.resourcemanager.chaos.fluent.WorkspacesClient.beginRefreshRecommendations":"Microsoft.Chaos.Workspaces.refreshRecommendations","com.azure.resourcemanager.chaos.fluent.WorkspacesClient.beginUpdate":"Microsoft.Chaos.Workspaces.update","com.azure.resourcemanager.chaos.fluent.WorkspacesClient.createOrUpdate":"Microsoft.Chaos.Workspaces.createOrUpdate","com.azure.resourcemanager.chaos.fluent.WorkspacesClient.delete":"Microsoft.Chaos.Workspaces.delete","com.azure.resourcemanager.chaos.fluent.WorkspacesClient.getByResourceGroup":"Microsoft.Chaos.Workspaces.get","com.azure.resourcemanager.chaos.fluent.WorkspacesClient.getByResourceGroupWithResponse":"Microsoft.Chaos.Workspaces.get","com.azure.resourcemanager.chaos.fluent.WorkspacesClient.list":"Microsoft.Chaos.Workspaces.listAll","com.azure.resourcemanager.chaos.fluent.WorkspacesClient.listByResourceGroup":"Microsoft.Chaos.Workspaces.list","com.azure.resourcemanager.chaos.fluent.WorkspacesClient.refreshRecommendations":"Microsoft.Chaos.Workspaces.refreshRecommendations","com.azure.resourcemanager.chaos.fluent.WorkspacesClient.update":"Microsoft.Chaos.Workspaces.update","com.azure.resourcemanager.chaos.fluent.models.ActionInner":"Microsoft.Chaos.Action","com.azure.resourcemanager.chaos.fluent.models.ActionProperties":"Microsoft.Chaos.ActionProperties","com.azure.resourcemanager.chaos.fluent.models.ActionVersionInner":"Microsoft.Chaos.ActionVersion","com.azure.resourcemanager.chaos.fluent.models.CapabilityInner":"Microsoft.Chaos.Capability","com.azure.resourcemanager.chaos.fluent.models.CapabilityProperties":"Microsoft.Chaos.CapabilityProperties","com.azure.resourcemanager.chaos.fluent.models.CapabilityTypeInner":"Microsoft.Chaos.CapabilityType","com.azure.resourcemanager.chaos.fluent.models.CapabilityTypeProperties":"Microsoft.Chaos.CapabilityTypeProperties","com.azure.resourcemanager.chaos.fluent.models.DiscoveredResourceInner":"Microsoft.Chaos.DiscoveredResource","com.azure.resourcemanager.chaos.fluent.models.ExperimentExecutionDetailsInner":"Microsoft.Chaos.ExperimentExecutionDetails","com.azure.resourcemanager.chaos.fluent.models.ExperimentExecutionDetailsProperties":"Microsoft.Chaos.ExperimentExecutionDetailsProperties","com.azure.resourcemanager.chaos.fluent.models.ExperimentExecutionInner":"Microsoft.Chaos.ExperimentExecution","com.azure.resourcemanager.chaos.fluent.models.ExperimentExecutionProperties":"Microsoft.Chaos.ExperimentExecutionProperties","com.azure.resourcemanager.chaos.fluent.models.ExperimentInner":"Microsoft.Chaos.Experiment","com.azure.resourcemanager.chaos.fluent.models.ExperimentProperties":"Microsoft.Chaos.ExperimentProperties","com.azure.resourcemanager.chaos.fluent.models.OperationInner":"Azure.ResourceManager.CommonTypes.Operation","com.azure.resourcemanager.chaos.fluent.models.OperationStatusInner":"Azure.ResourceManager.CommonTypes.OperationStatusResult","com.azure.resourcemanager.chaos.fluent.models.PrivateAccessInner":"Microsoft.Chaos.PrivateAccess","com.azure.resourcemanager.chaos.fluent.models.PrivateEndpointConnectionInner":"Microsoft.Chaos.PrivateEndpointConnection","com.azure.resourcemanager.chaos.fluent.models.PrivateLinkResourceListResultInner":"Microsoft.Chaos.PrivateLinkResourceListResult","com.azure.resourcemanager.chaos.fluent.models.ScenarioConfigurationInner":"Microsoft.Chaos.ScenarioConfiguration","com.azure.resourcemanager.chaos.fluent.models.ScenarioInner":"Microsoft.Chaos.Scenario","com.azure.resourcemanager.chaos.fluent.models.ScenarioRunInner":"Microsoft.Chaos.ScenarioRun","com.azure.resourcemanager.chaos.fluent.models.TargetInner":"Microsoft.Chaos.Target","com.azure.resourcemanager.chaos.fluent.models.TargetTypeInner":"Microsoft.Chaos.TargetType","com.azure.resourcemanager.chaos.fluent.models.TargetTypeProperties":"Microsoft.Chaos.TargetTypeProperties","com.azure.resourcemanager.chaos.fluent.models.WorkspaceInner":"Microsoft.Chaos.Workspace","com.azure.resourcemanager.chaos.implementation.ChaosManagementClientBuilder":"Microsoft.Chaos","com.azure.resourcemanager.chaos.implementation.models.ActionListResult":"Microsoft.Chaos.ActionListResult","com.azure.resourcemanager.chaos.implementation.models.ActionVersionListResult":"Microsoft.Chaos.ActionVersionListResult","com.azure.resourcemanager.chaos.implementation.models.CapabilityListResult":"Microsoft.Chaos.CapabilityListResult","com.azure.resourcemanager.chaos.implementation.models.CapabilityTypeListResult":"Microsoft.Chaos.CapabilityTypeListResult","com.azure.resourcemanager.chaos.implementation.models.DiscoveredResourceListResult":"Microsoft.Chaos.DiscoveredResourceListResult","com.azure.resourcemanager.chaos.implementation.models.ExperimentExecutionListResult":"Microsoft.Chaos.ExperimentExecutionListResult","com.azure.resourcemanager.chaos.implementation.models.ExperimentListResult":"Microsoft.Chaos.ExperimentListResult","com.azure.resourcemanager.chaos.implementation.models.OperationListResult":"Azure.ResourceManager.CommonTypes.OperationListResult","com.azure.resourcemanager.chaos.implementation.models.PrivateAccessListResult":"Microsoft.Chaos.PrivateAccessListResult","com.azure.resourcemanager.chaos.implementation.models.PrivateEndpointConnectionListResult":"Microsoft.Chaos.PrivateEndpointConnectionListResult","com.azure.resourcemanager.chaos.implementation.models.ScenarioConfigurationListResult":"Microsoft.Chaos.ScenarioConfigurationListResult","com.azure.resourcemanager.chaos.implementation.models.ScenarioListResult":"Microsoft.Chaos.ScenarioListResult","com.azure.resourcemanager.chaos.implementation.models.ScenarioRunListResult":"Microsoft.Chaos.ScenarioRunListResult","com.azure.resourcemanager.chaos.implementation.models.TargetListResult":"Microsoft.Chaos.TargetListResult","com.azure.resourcemanager.chaos.implementation.models.TargetTypeListResult":"Microsoft.Chaos.TargetTypeListResult","com.azure.resourcemanager.chaos.implementation.models.WorkspaceListResult":"Microsoft.Chaos.WorkspaceListResult","com.azure.resourcemanager.chaos.models.ActionDependency":"Microsoft.Chaos.ActionDependency","com.azure.resourcemanager.chaos.models.ActionDependencyType":"Microsoft.Chaos.ActionDependencyType","com.azure.resourcemanager.chaos.models.ActionKind":"Microsoft.Chaos.ActionKind","com.azure.resourcemanager.chaos.models.ActionLifecycle":"Microsoft.Chaos.ActionLifecycle","com.azure.resourcemanager.chaos.models.ActionPropertiesParametersSchema":"Microsoft.Chaos.ActionProperties.parametersSchema.anonymous","com.azure.resourcemanager.chaos.models.ActionStatus":"Microsoft.Chaos.ActionStatus","com.azure.resourcemanager.chaos.models.ActionSupportedTargetType":"Microsoft.Chaos.ActionSupportedTargetType","com.azure.resourcemanager.chaos.models.ActionType":"Azure.ResourceManager.CommonTypes.ActionType","com.azure.resourcemanager.chaos.models.BranchStatus":"Microsoft.Chaos.BranchStatus","com.azure.resourcemanager.chaos.models.CapabilityTypePropertiesRuntimeProperties":"Microsoft.Chaos.CapabilityTypePropertiesRuntimeProperties","com.azure.resourcemanager.chaos.models.ChaosExperimentAction":"Microsoft.Chaos.ChaosExperimentAction","com.azure.resourcemanager.chaos.models.ChaosExperimentBranch":"Microsoft.Chaos.ChaosExperimentBranch","com.azure.resourcemanager.chaos.models.ChaosExperimentStep":"Microsoft.Chaos.ChaosExperimentStep","com.azure.resourcemanager.chaos.models.ChaosTargetFilter":"Microsoft.Chaos.ChaosTargetFilter","com.azure.resourcemanager.chaos.models.ChaosTargetListSelector":"Microsoft.Chaos.ChaosTargetListSelector","com.azure.resourcemanager.chaos.models.ChaosTargetQuerySelector":"Microsoft.Chaos.ChaosTargetQuerySelector","com.azure.resourcemanager.chaos.models.ChaosTargetSelector":"Microsoft.Chaos.ChaosTargetSelector","com.azure.resourcemanager.chaos.models.ChaosTargetSimpleFilter":"Microsoft.Chaos.ChaosTargetSimpleFilter","com.azure.resourcemanager.chaos.models.ChaosTargetSimpleFilterParameters":"Microsoft.Chaos.ChaosTargetSimpleFilterParameters","com.azure.resourcemanager.chaos.models.ConfigurationExclusions":"Microsoft.Chaos.ConfigurationExclusions","com.azure.resourcemanager.chaos.models.ConfigurationFilters":"Microsoft.Chaos.ConfigurationFilters","com.azure.resourcemanager.chaos.models.ContinuousAction":"Microsoft.Chaos.ContinuousAction","com.azure.resourcemanager.chaos.models.CustomerDataStorageProperties":"Microsoft.Chaos.CustomerDataStorageProperties","com.azure.resourcemanager.chaos.models.DelayAction":"Microsoft.Chaos.DelayAction","com.azure.resourcemanager.chaos.models.DiscoveredResourceProperties":"Microsoft.Chaos.DiscoveredResourceProperties","com.azure.resourcemanager.chaos.models.DiscreteAction":"Microsoft.Chaos.DiscreteAction","com.azure.resourcemanager.chaos.models.EntraIdentity":"Microsoft.Chaos.EntraIdentity","com.azure.resourcemanager.chaos.models.ExperimentActionType":"Microsoft.Chaos.ExperimentActionType","com.azure.resourcemanager.chaos.models.ExperimentExecutionActionTargetDetailsError":"Microsoft.Chaos.ExperimentExecutionActionTargetDetailsError","com.azure.resourcemanager.chaos.models.ExperimentExecutionActionTargetDetailsProperties":"Microsoft.Chaos.ExperimentExecutionActionTargetDetailsProperties","com.azure.resourcemanager.chaos.models.ExperimentExecutionDetailsPropertiesRunInformation":"Microsoft.Chaos.ExperimentExecutionDetailsPropertiesRunInformation","com.azure.resourcemanager.chaos.models.ExperimentUpdate":"Microsoft.Chaos.ExperimentUpdate","com.azure.resourcemanager.chaos.models.ExternalResource":"Microsoft.Chaos.ExternalResource","com.azure.resourcemanager.chaos.models.FilterType":"Microsoft.Chaos.FilterType","com.azure.resourcemanager.chaos.models.FixResourcePermissionsRequest":"Microsoft.Chaos.FixResourcePermissionsRequest","com.azure.resourcemanager.chaos.models.KeyValuePair":"Microsoft.Chaos.KeyValuePair","com.azure.resourcemanager.chaos.models.ManagedServiceIdentityType":"Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType","com.azure.resourcemanager.chaos.models.OperationDisplay":"Azure.ResourceManager.CommonTypes.OperationDisplay","com.azure.resourcemanager.chaos.models.OperationError":"Microsoft.Chaos.OperationError","com.azure.resourcemanager.chaos.models.Origin":"Azure.ResourceManager.CommonTypes.Origin","com.azure.resourcemanager.chaos.models.ParameterType":"Microsoft.Chaos.ParameterType","com.azure.resourcemanager.chaos.models.PermissionError":"Microsoft.Chaos.PermissionError","com.azure.resourcemanager.chaos.models.PermissionsFix":"Microsoft.Chaos.PermissionsFix","com.azure.resourcemanager.chaos.models.PermissionsFixProperties":"Microsoft.Chaos.PermissionsFixProperties","com.azure.resourcemanager.chaos.models.PermissionsFixState":"Microsoft.Chaos.PermissionsFixState","com.azure.resourcemanager.chaos.models.PermissionsFixSummary":"Microsoft.Chaos.PermissionsFixSummary","com.azure.resourcemanager.chaos.models.PhysicalToLogicalZoneMapping":"Microsoft.Chaos.PhysicalToLogicalZoneMapping","com.azure.resourcemanager.chaos.models.PrivateAccessPatch":"Microsoft.Chaos.PrivateAccessPatch","com.azure.resourcemanager.chaos.models.PrivateAccessProperties":"Microsoft.Chaos.PrivateAccessProperties","com.azure.resourcemanager.chaos.models.PrivateEndpoint":"Microsoft.Chaos.PrivateEndpoint","com.azure.resourcemanager.chaos.models.PrivateEndpointConnectionProperties":"Microsoft.Chaos.PrivateEndpointConnectionProperties","com.azure.resourcemanager.chaos.models.PrivateEndpointServiceConnectionStatus":"Microsoft.Chaos.PrivateEndpointServiceConnectionStatus","com.azure.resourcemanager.chaos.models.PrivateLinkResource":"Microsoft.Chaos.PrivateLinkResource","com.azure.resourcemanager.chaos.models.PrivateLinkResourceProperties":"Microsoft.Chaos.PrivateLinkResourceProperties","com.azure.resourcemanager.chaos.models.PrivateLinkServiceConnectionState":"Microsoft.Chaos.PrivateLinkServiceConnectionState","com.azure.resourcemanager.chaos.models.ProvisioningState":"Microsoft.Chaos.ProvisioningState","com.azure.resourcemanager.chaos.models.PublicNetworkAccessOption":"Microsoft.Chaos.PublicNetworkAccessOption","com.azure.resourcemanager.chaos.models.Recommendation":"Microsoft.Chaos.Recommendation","com.azure.resourcemanager.chaos.models.RecommendationStatus":"Microsoft.Chaos.RecommendationStatus","com.azure.resourcemanager.chaos.models.ResourceIdentity":"Azure.ResourceManager.CommonTypes.ManagedServiceIdentity","com.azure.resourcemanager.chaos.models.ResourceStateError":"Microsoft.Chaos.ResourceStateError","com.azure.resourcemanager.chaos.models.RoleAssignmentError":"Microsoft.Chaos.RoleAssignmentError","com.azure.resourcemanager.chaos.models.RoleAssignmentResult":"Microsoft.Chaos.RoleAssignmentResult","com.azure.resourcemanager.chaos.models.RoleAssignmentStatus":"Microsoft.Chaos.RoleAssignmentStatus","com.azure.resourcemanager.chaos.models.RunAfter":"Microsoft.Chaos.RunAfter","com.azure.resourcemanager.chaos.models.RunAfterBehavior":"Microsoft.Chaos.RunAfterBehavior","com.azure.resourcemanager.chaos.models.ScenarioAction":"Microsoft.Chaos.ScenarioAction","com.azure.resourcemanager.chaos.models.ScenarioConfigurationProperties":"Microsoft.Chaos.ScenarioConfigurationProperties","com.azure.resourcemanager.chaos.models.ScenarioConfigurationsExecuteHeaders":null,"com.azure.resourcemanager.chaos.models.ScenarioErrors":"Microsoft.Chaos.ScenarioErrors","com.azure.resourcemanager.chaos.models.ScenarioEvaluationResultItem":"Microsoft.Chaos.ScenarioEvaluationResultItem","com.azure.resourcemanager.chaos.models.ScenarioParameter":"Microsoft.Chaos.ScenarioParameter","com.azure.resourcemanager.chaos.models.ScenarioProperties":"Microsoft.Chaos.ScenarioProperties","com.azure.resourcemanager.chaos.models.ScenarioRunProperties":"Microsoft.Chaos.ScenarioRunProperties","com.azure.resourcemanager.chaos.models.ScenarioRunResource":"Microsoft.Chaos.ScenarioRunResource","com.azure.resourcemanager.chaos.models.ScenarioRunState":"Microsoft.Chaos.ScenarioRunState","com.azure.resourcemanager.chaos.models.ScenarioRunSummaryAction":"Microsoft.Chaos.ScenarioRunSummaryAction","com.azure.resourcemanager.chaos.models.ScenarioRunsCancelHeaders":null,"com.azure.resourcemanager.chaos.models.ScenarioRunsGetHeaders":null,"com.azure.resourcemanager.chaos.models.ScenarioSummaryState":"Microsoft.Chaos.ScenarioSummaryState","com.azure.resourcemanager.chaos.models.ScenarioValidationState":"Microsoft.Chaos.ScenarioValidationState","com.azure.resourcemanager.chaos.models.SelectorType":"Microsoft.Chaos.SelectorType","com.azure.resourcemanager.chaos.models.StepStatus":"Microsoft.Chaos.StepStatus","com.azure.resourcemanager.chaos.models.TargetReference":"Microsoft.Chaos.TargetReference","com.azure.resourcemanager.chaos.models.TargetReferenceType":"Microsoft.Chaos.TargetReferenceType","com.azure.resourcemanager.chaos.models.UserAssignedIdentity":"Azure.ResourceManager.CommonTypes.UserAssignedIdentity","com.azure.resourcemanager.chaos.models.Validation":"Microsoft.Chaos.Validation","com.azure.resourcemanager.chaos.models.ValidationProperties":"Microsoft.Chaos.ValidationProperties","com.azure.resourcemanager.chaos.models.WorkspaceEvaluation":"Microsoft.Chaos.WorkspaceEvaluation","com.azure.resourcemanager.chaos.models.WorkspaceEvaluationProperties":"Microsoft.Chaos.WorkspaceEvaluationProperties","com.azure.resourcemanager.chaos.models.WorkspaceEvaluationStatus":"Microsoft.Chaos.WorkspaceEvaluationStatus","com.azure.resourcemanager.chaos.models.WorkspaceProperties":"Microsoft.Chaos.WorkspaceProperties","com.azure.resourcemanager.chaos.models.WorkspaceUpdate":"Microsoft.Chaos.WorkspaceUpdate","com.azure.resourcemanager.chaos.models.ZoneResolutionInfo":"Microsoft.Chaos.ZoneResolutionInfo","com.azure.resourcemanager.chaos.models.ZoneResolutionMapping":"Microsoft.Chaos.ZoneResolutionMapping","com.azure.resourcemanager.chaos.models.ZoneResolutionMode":"Microsoft.Chaos.ZoneResolutionMode"},"generatedFiles":["src/main/java/com/azure/resourcemanager/chaos/ChaosManager.java","src/main/java/com/azure/resourcemanager/chaos/fluent/ActionVersionsClient.java","src/main/java/com/azure/resourcemanager/chaos/fluent/ActionsClient.java","src/main/java/com/azure/resourcemanager/chaos/fluent/CapabilitiesClient.java","src/main/java/com/azure/resourcemanager/chaos/fluent/CapabilityTypesClient.java","src/main/java/com/azure/resourcemanager/chaos/fluent/ChaosManagementClient.java","src/main/java/com/azure/resourcemanager/chaos/fluent/DiscoveredResourcesClient.java","src/main/java/com/azure/resourcemanager/chaos/fluent/ExperimentsClient.java","src/main/java/com/azure/resourcemanager/chaos/fluent/OperationStatusesClient.java","src/main/java/com/azure/resourcemanager/chaos/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/chaos/fluent/PrivateAccessesClient.java","src/main/java/com/azure/resourcemanager/chaos/fluent/ScenarioConfigurationsClient.java","src/main/java/com/azure/resourcemanager/chaos/fluent/ScenarioRunsClient.java","src/main/java/com/azure/resourcemanager/chaos/fluent/ScenariosClient.java","src/main/java/com/azure/resourcemanager/chaos/fluent/TargetTypesClient.java","src/main/java/com/azure/resourcemanager/chaos/fluent/TargetsClient.java","src/main/java/com/azure/resourcemanager/chaos/fluent/WorkspacesClient.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/ActionInner.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/ActionProperties.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/ActionVersionInner.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/CapabilityInner.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/CapabilityProperties.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/CapabilityTypeInner.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/CapabilityTypeProperties.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/DiscoveredResourceInner.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentExecutionDetailsInner.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentExecutionDetailsProperties.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentExecutionInner.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentExecutionProperties.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentInner.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentProperties.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/OperationStatusInner.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/PrivateAccessInner.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/PrivateEndpointConnectionInner.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/PrivateLinkResourceListResultInner.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/ScenarioConfigurationInner.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/ScenarioInner.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/ScenarioRunInner.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/TargetInner.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/TargetTypeInner.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/TargetTypeProperties.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/WorkspaceInner.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/chaos/fluent/package-info.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ActionImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ActionVersionImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ActionVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ActionVersionsImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ActionsClientImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ActionsImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilitiesClientImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilitiesImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilityImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilityTypeImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilityTypesClientImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilityTypesImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ChaosManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ChaosManagementClientImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/DiscoveredResourceImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/DiscoveredResourcesClientImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/DiscoveredResourcesImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentExecutionDetailsImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentExecutionImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentsClientImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentsImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/OperationImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/OperationStatusImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/OperationStatusesClientImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/OperationStatusesImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/PrivateAccessImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/PrivateAccessesClientImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/PrivateAccessesImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/PrivateEndpointConnectionImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/PrivateLinkResourceListResultImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioConfigurationImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioConfigurationsClientImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioConfigurationsImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioRunImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioRunsClientImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioRunsImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ScenariosClientImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ScenariosImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/TargetImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/TargetTypeImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/TargetTypesClientImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/TargetTypesImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/TargetsClientImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/TargetsImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/WorkspaceImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/WorkspacesClientImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/WorkspacesImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/models/ActionListResult.java","src/main/java/com/azure/resourcemanager/chaos/implementation/models/ActionVersionListResult.java","src/main/java/com/azure/resourcemanager/chaos/implementation/models/CapabilityListResult.java","src/main/java/com/azure/resourcemanager/chaos/implementation/models/CapabilityTypeListResult.java","src/main/java/com/azure/resourcemanager/chaos/implementation/models/DiscoveredResourceListResult.java","src/main/java/com/azure/resourcemanager/chaos/implementation/models/ExperimentExecutionListResult.java","src/main/java/com/azure/resourcemanager/chaos/implementation/models/ExperimentListResult.java","src/main/java/com/azure/resourcemanager/chaos/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/chaos/implementation/models/PrivateAccessListResult.java","src/main/java/com/azure/resourcemanager/chaos/implementation/models/PrivateEndpointConnectionListResult.java","src/main/java/com/azure/resourcemanager/chaos/implementation/models/ScenarioConfigurationListResult.java","src/main/java/com/azure/resourcemanager/chaos/implementation/models/ScenarioListResult.java","src/main/java/com/azure/resourcemanager/chaos/implementation/models/ScenarioRunListResult.java","src/main/java/com/azure/resourcemanager/chaos/implementation/models/TargetListResult.java","src/main/java/com/azure/resourcemanager/chaos/implementation/models/TargetTypeListResult.java","src/main/java/com/azure/resourcemanager/chaos/implementation/models/WorkspaceListResult.java","src/main/java/com/azure/resourcemanager/chaos/implementation/package-info.java","src/main/java/com/azure/resourcemanager/chaos/models/Action.java","src/main/java/com/azure/resourcemanager/chaos/models/ActionDependency.java","src/main/java/com/azure/resourcemanager/chaos/models/ActionDependencyType.java","src/main/java/com/azure/resourcemanager/chaos/models/ActionKind.java","src/main/java/com/azure/resourcemanager/chaos/models/ActionLifecycle.java","src/main/java/com/azure/resourcemanager/chaos/models/ActionPropertiesParametersSchema.java","src/main/java/com/azure/resourcemanager/chaos/models/ActionStatus.java","src/main/java/com/azure/resourcemanager/chaos/models/ActionSupportedTargetType.java","src/main/java/com/azure/resourcemanager/chaos/models/ActionType.java","src/main/java/com/azure/resourcemanager/chaos/models/ActionVersion.java","src/main/java/com/azure/resourcemanager/chaos/models/ActionVersions.java","src/main/java/com/azure/resourcemanager/chaos/models/Actions.java","src/main/java/com/azure/resourcemanager/chaos/models/BranchStatus.java","src/main/java/com/azure/resourcemanager/chaos/models/Capabilities.java","src/main/java/com/azure/resourcemanager/chaos/models/Capability.java","src/main/java/com/azure/resourcemanager/chaos/models/CapabilityType.java","src/main/java/com/azure/resourcemanager/chaos/models/CapabilityTypePropertiesRuntimeProperties.java","src/main/java/com/azure/resourcemanager/chaos/models/CapabilityTypes.java","src/main/java/com/azure/resourcemanager/chaos/models/ChaosExperimentAction.java","src/main/java/com/azure/resourcemanager/chaos/models/ChaosExperimentBranch.java","src/main/java/com/azure/resourcemanager/chaos/models/ChaosExperimentStep.java","src/main/java/com/azure/resourcemanager/chaos/models/ChaosTargetFilter.java","src/main/java/com/azure/resourcemanager/chaos/models/ChaosTargetListSelector.java","src/main/java/com/azure/resourcemanager/chaos/models/ChaosTargetQuerySelector.java","src/main/java/com/azure/resourcemanager/chaos/models/ChaosTargetSelector.java","src/main/java/com/azure/resourcemanager/chaos/models/ChaosTargetSimpleFilter.java","src/main/java/com/azure/resourcemanager/chaos/models/ChaosTargetSimpleFilterParameters.java","src/main/java/com/azure/resourcemanager/chaos/models/ConfigurationExclusions.java","src/main/java/com/azure/resourcemanager/chaos/models/ConfigurationFilters.java","src/main/java/com/azure/resourcemanager/chaos/models/ContinuousAction.java","src/main/java/com/azure/resourcemanager/chaos/models/CustomerDataStorageProperties.java","src/main/java/com/azure/resourcemanager/chaos/models/DelayAction.java","src/main/java/com/azure/resourcemanager/chaos/models/DiscoveredResource.java","src/main/java/com/azure/resourcemanager/chaos/models/DiscoveredResourceProperties.java","src/main/java/com/azure/resourcemanager/chaos/models/DiscoveredResources.java","src/main/java/com/azure/resourcemanager/chaos/models/DiscreteAction.java","src/main/java/com/azure/resourcemanager/chaos/models/EntraIdentity.java","src/main/java/com/azure/resourcemanager/chaos/models/Experiment.java","src/main/java/com/azure/resourcemanager/chaos/models/ExperimentActionType.java","src/main/java/com/azure/resourcemanager/chaos/models/ExperimentExecution.java","src/main/java/com/azure/resourcemanager/chaos/models/ExperimentExecutionActionTargetDetailsError.java","src/main/java/com/azure/resourcemanager/chaos/models/ExperimentExecutionActionTargetDetailsProperties.java","src/main/java/com/azure/resourcemanager/chaos/models/ExperimentExecutionDetails.java","src/main/java/com/azure/resourcemanager/chaos/models/ExperimentExecutionDetailsPropertiesRunInformation.java","src/main/java/com/azure/resourcemanager/chaos/models/ExperimentUpdate.java","src/main/java/com/azure/resourcemanager/chaos/models/Experiments.java","src/main/java/com/azure/resourcemanager/chaos/models/ExternalResource.java","src/main/java/com/azure/resourcemanager/chaos/models/FilterType.java","src/main/java/com/azure/resourcemanager/chaos/models/FixResourcePermissionsRequest.java","src/main/java/com/azure/resourcemanager/chaos/models/KeyValuePair.java","src/main/java/com/azure/resourcemanager/chaos/models/ManagedServiceIdentityType.java","src/main/java/com/azure/resourcemanager/chaos/models/Operation.java","src/main/java/com/azure/resourcemanager/chaos/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/chaos/models/OperationError.java","src/main/java/com/azure/resourcemanager/chaos/models/OperationStatus.java","src/main/java/com/azure/resourcemanager/chaos/models/OperationStatuses.java","src/main/java/com/azure/resourcemanager/chaos/models/Operations.java","src/main/java/com/azure/resourcemanager/chaos/models/Origin.java","src/main/java/com/azure/resourcemanager/chaos/models/ParameterType.java","src/main/java/com/azure/resourcemanager/chaos/models/PermissionError.java","src/main/java/com/azure/resourcemanager/chaos/models/PermissionsFix.java","src/main/java/com/azure/resourcemanager/chaos/models/PermissionsFixProperties.java","src/main/java/com/azure/resourcemanager/chaos/models/PermissionsFixState.java","src/main/java/com/azure/resourcemanager/chaos/models/PermissionsFixSummary.java","src/main/java/com/azure/resourcemanager/chaos/models/PhysicalToLogicalZoneMapping.java","src/main/java/com/azure/resourcemanager/chaos/models/PrivateAccess.java","src/main/java/com/azure/resourcemanager/chaos/models/PrivateAccessPatch.java","src/main/java/com/azure/resourcemanager/chaos/models/PrivateAccessProperties.java","src/main/java/com/azure/resourcemanager/chaos/models/PrivateAccesses.java","src/main/java/com/azure/resourcemanager/chaos/models/PrivateEndpoint.java","src/main/java/com/azure/resourcemanager/chaos/models/PrivateEndpointConnection.java","src/main/java/com/azure/resourcemanager/chaos/models/PrivateEndpointConnectionProperties.java","src/main/java/com/azure/resourcemanager/chaos/models/PrivateEndpointServiceConnectionStatus.java","src/main/java/com/azure/resourcemanager/chaos/models/PrivateLinkResource.java","src/main/java/com/azure/resourcemanager/chaos/models/PrivateLinkResourceListResult.java","src/main/java/com/azure/resourcemanager/chaos/models/PrivateLinkResourceProperties.java","src/main/java/com/azure/resourcemanager/chaos/models/PrivateLinkServiceConnectionState.java","src/main/java/com/azure/resourcemanager/chaos/models/ProvisioningState.java","src/main/java/com/azure/resourcemanager/chaos/models/PublicNetworkAccessOption.java","src/main/java/com/azure/resourcemanager/chaos/models/Recommendation.java","src/main/java/com/azure/resourcemanager/chaos/models/RecommendationStatus.java","src/main/java/com/azure/resourcemanager/chaos/models/ResourceIdentity.java","src/main/java/com/azure/resourcemanager/chaos/models/ResourceStateError.java","src/main/java/com/azure/resourcemanager/chaos/models/RoleAssignmentError.java","src/main/java/com/azure/resourcemanager/chaos/models/RoleAssignmentResult.java","src/main/java/com/azure/resourcemanager/chaos/models/RoleAssignmentStatus.java","src/main/java/com/azure/resourcemanager/chaos/models/RunAfter.java","src/main/java/com/azure/resourcemanager/chaos/models/RunAfterBehavior.java","src/main/java/com/azure/resourcemanager/chaos/models/Scenario.java","src/main/java/com/azure/resourcemanager/chaos/models/ScenarioAction.java","src/main/java/com/azure/resourcemanager/chaos/models/ScenarioConfiguration.java","src/main/java/com/azure/resourcemanager/chaos/models/ScenarioConfigurationProperties.java","src/main/java/com/azure/resourcemanager/chaos/models/ScenarioConfigurations.java","src/main/java/com/azure/resourcemanager/chaos/models/ScenarioConfigurationsExecuteHeaders.java","src/main/java/com/azure/resourcemanager/chaos/models/ScenarioConfigurationsExecuteResponse.java","src/main/java/com/azure/resourcemanager/chaos/models/ScenarioErrors.java","src/main/java/com/azure/resourcemanager/chaos/models/ScenarioEvaluationResultItem.java","src/main/java/com/azure/resourcemanager/chaos/models/ScenarioParameter.java","src/main/java/com/azure/resourcemanager/chaos/models/ScenarioProperties.java","src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRun.java","src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunProperties.java","src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunResource.java","src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunState.java","src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunSummaryAction.java","src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRuns.java","src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunsCancelHeaders.java","src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunsCancelResponse.java","src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunsGetHeaders.java","src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunsGetResponse.java","src/main/java/com/azure/resourcemanager/chaos/models/ScenarioSummaryState.java","src/main/java/com/azure/resourcemanager/chaos/models/ScenarioValidationState.java","src/main/java/com/azure/resourcemanager/chaos/models/Scenarios.java","src/main/java/com/azure/resourcemanager/chaos/models/SelectorType.java","src/main/java/com/azure/resourcemanager/chaos/models/StepStatus.java","src/main/java/com/azure/resourcemanager/chaos/models/Target.java","src/main/java/com/azure/resourcemanager/chaos/models/TargetReference.java","src/main/java/com/azure/resourcemanager/chaos/models/TargetReferenceType.java","src/main/java/com/azure/resourcemanager/chaos/models/TargetType.java","src/main/java/com/azure/resourcemanager/chaos/models/TargetTypes.java","src/main/java/com/azure/resourcemanager/chaos/models/Targets.java","src/main/java/com/azure/resourcemanager/chaos/models/UserAssignedIdentity.java","src/main/java/com/azure/resourcemanager/chaos/models/Validation.java","src/main/java/com/azure/resourcemanager/chaos/models/ValidationProperties.java","src/main/java/com/azure/resourcemanager/chaos/models/Workspace.java","src/main/java/com/azure/resourcemanager/chaos/models/WorkspaceEvaluation.java","src/main/java/com/azure/resourcemanager/chaos/models/WorkspaceEvaluationProperties.java","src/main/java/com/azure/resourcemanager/chaos/models/WorkspaceEvaluationStatus.java","src/main/java/com/azure/resourcemanager/chaos/models/WorkspaceProperties.java","src/main/java/com/azure/resourcemanager/chaos/models/WorkspaceUpdate.java","src/main/java/com/azure/resourcemanager/chaos/models/Workspaces.java","src/main/java/com/azure/resourcemanager/chaos/models/ZoneResolutionInfo.java","src/main/java/com/azure/resourcemanager/chaos/models/ZoneResolutionMapping.java","src/main/java/com/azure/resourcemanager/chaos/models/ZoneResolutionMode.java","src/main/java/com/azure/resourcemanager/chaos/models/package-info.java","src/main/java/com/azure/resourcemanager/chaos/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-chaos/proxy-config.json b/sdk/chaos/azure-resourcemanager-chaos/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-chaos/proxy-config.json index 0a68244d3b7c..3c5a34dbd78f 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-chaos/proxy-config.json +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-chaos/proxy-config.json @@ -1 +1 @@ -[["com.azure.resourcemanager.chaos.implementation.CapabilitiesClientImpl$CapabilitiesService"],["com.azure.resourcemanager.chaos.implementation.CapabilityTypesClientImpl$CapabilityTypesService"],["com.azure.resourcemanager.chaos.implementation.ExperimentsClientImpl$ExperimentsService"],["com.azure.resourcemanager.chaos.implementation.OperationStatusesClientImpl$OperationStatusesService"],["com.azure.resourcemanager.chaos.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.chaos.implementation.TargetTypesClientImpl$TargetTypesService"],["com.azure.resourcemanager.chaos.implementation.TargetsClientImpl$TargetsService"]] \ No newline at end of file +[["com.azure.resourcemanager.chaos.implementation.ActionVersionsClientImpl$ActionVersionsService"],["com.azure.resourcemanager.chaos.implementation.ActionsClientImpl$ActionsService"],["com.azure.resourcemanager.chaos.implementation.CapabilitiesClientImpl$CapabilitiesService"],["com.azure.resourcemanager.chaos.implementation.CapabilityTypesClientImpl$CapabilityTypesService"],["com.azure.resourcemanager.chaos.implementation.DiscoveredResourcesClientImpl$DiscoveredResourcesService"],["com.azure.resourcemanager.chaos.implementation.ExperimentsClientImpl$ExperimentsService"],["com.azure.resourcemanager.chaos.implementation.OperationStatusesClientImpl$OperationStatusesService"],["com.azure.resourcemanager.chaos.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.chaos.implementation.PrivateAccessesClientImpl$PrivateAccessesService"],["com.azure.resourcemanager.chaos.implementation.ScenarioConfigurationsClientImpl$ScenarioConfigurationsService"],["com.azure.resourcemanager.chaos.implementation.ScenarioRunsClientImpl$ScenarioRunsService"],["com.azure.resourcemanager.chaos.implementation.ScenariosClientImpl$ScenariosService"],["com.azure.resourcemanager.chaos.implementation.TargetTypesClientImpl$TargetTypesService"],["com.azure.resourcemanager.chaos.implementation.TargetsClientImpl$TargetsService"],["com.azure.resourcemanager.chaos.implementation.WorkspacesClientImpl$WorkspacesService"]] \ No newline at end of file diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ActionVersionsGetSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ActionVersionsGetSamples.java new file mode 100644 index 000000000000..1a37a7620905 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ActionVersionsGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +/** + * Samples for ActionVersions Get. + */ +public final class ActionVersionsGetSamples { + /* + * x-ms-original-file: 2026-05-01-preview/ActionVersions_Get.json + */ + /** + * Sample code: Get an Action Version for westus2 location. + * + * @param manager Entry point to ChaosManager. + */ + public static void getAnActionVersionForWestus2Location(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.actionVersions() + .getWithResponse("westus2", "microsoft-compute-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/ActionVersionsListSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ActionVersionsListSamples.java new file mode 100644 index 000000000000..5144a45ecfd3 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ActionVersionsListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +/** + * Samples for ActionVersions List. + */ +public final class ActionVersionsListSamples { + /* + * x-ms-original-file: 2026-05-01-preview/ActionVersions_List.json + */ + /** + * Sample code: List all Action Versions for a given action. + * + * @param manager Entry point to ChaosManager. + */ + public static void listAllActionVersionsForAGivenAction(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.actionVersions().list("westus2", "microsoft-compute-shutdown", null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ActionsGetSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ActionsGetSamples.java new file mode 100644 index 000000000000..267946035a1d --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ActionsGetSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +/** + * Samples for Actions Get. + */ +public final class ActionsGetSamples { + /* + * x-ms-original-file: 2026-05-01-preview/Actions_Get.json + */ + /** + * Sample code: Get an Action for westus2 location. + * + * @param manager Entry point to ChaosManager. + */ + public static void getAnActionForWestus2Location(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.actions().getWithResponse("westus2", "microsoft-compute-shutdown", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ActionsListSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ActionsListSamples.java new file mode 100644 index 000000000000..233b3c91e27c --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ActionsListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +/** + * Samples for Actions List. + */ +public final class ActionsListSamples { + /* + * x-ms-original-file: 2026-05-01-preview/Actions_List.json + */ + /** + * Sample code: List all Actions for westus2 location. + * + * @param manager Entry point to ChaosManager. + */ + public static void listAllActionsForWestus2Location(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.actions().list("westus2", null, com.azure.core.util.Context.NONE); + } +} 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 a1181e930962..1690136fd316 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 @@ -11,7 +11,7 @@ */ public final class CapabilitiesCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-01-01/Capabilities_CreateOrUpdate.json + * x-ms-original-file: 2026-05-01-preview/Capabilities_CreateOrUpdate.json */ /** * Sample code: Create/update a Capability that extends a virtual machine Target resource. 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 50597826bcd8..bbac6dd640af 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 @@ -9,7 +9,7 @@ */ public final class CapabilitiesDeleteSamples { /* - * x-ms-original-file: 2025-01-01/Capabilities_Delete.json + * x-ms-original-file: 2026-05-01-preview/Capabilities_Delete.json */ /** * Sample code: Delete a Capability that extends a virtual machine Target resource. 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 e9fdadb334bd..2102c5e41d20 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 @@ -9,7 +9,7 @@ */ public final class CapabilitiesGetSamples { /* - * x-ms-original-file: 2025-01-01/Capabilities_Get.json + * x-ms-original-file: 2026-05-01-preview/Capabilities_Get.json */ /** * Sample code: Get a Capability that extends a virtual machine Target resource. 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 9e339b72e5f1..5ed344cf9ad2 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 @@ -9,7 +9,7 @@ */ public final class CapabilitiesListSamples { /* - * x-ms-original-file: 2025-01-01/Capabilities_List.json + * x-ms-original-file: 2026-05-01-preview/Capabilities_List.json */ /** * Sample code: List all Capabilities that extend a virtual machine Target resource. 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 e27921ed14ef..d0a4a487abfa 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 @@ -9,7 +9,7 @@ */ public final class CapabilityTypesGetSamples { /* - * x-ms-original-file: 2025-01-01/CapabilityTypes_Get.json + * x-ms-original-file: 2026-05-01-preview/CapabilityTypes_Get.json */ /** * Sample code: Get a Capability Type for a virtual machine Target resource on westus2 location. 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 535ecddb4b5a..428424a5dfaf 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 @@ -9,7 +9,7 @@ */ public final class CapabilityTypesListSamples { /* - * x-ms-original-file: 2025-01-01/CapabilityTypes_List.json + * x-ms-original-file: 2026-05-01-preview/CapabilityTypes_List.json */ /** * Sample code: List all Capability Types for a virtual machine Target resource on westus2 location. diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/DiscoveredResourcesGetSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/DiscoveredResourcesGetSamples.java new file mode 100644 index 000000000000..f82a1c65d955 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/DiscoveredResourcesGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +/** + * Samples for DiscoveredResources Get. + */ +public final class DiscoveredResourcesGetSamples { + /* + * x-ms-original-file: 2026-05-01-preview/DiscoveredResources_Get.json + */ + /** + * Sample code: Get a discovered resource. + * + * @param manager Entry point to ChaosManager. + */ + public static void getADiscoveredResource(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.discoveredResources() + .getWithResponse("exampleRG", "exampleWorkspace", "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/DiscoveredResourcesListByWorkspaceSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/DiscoveredResourcesListByWorkspaceSamples.java new file mode 100644 index 000000000000..a2803357b655 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/DiscoveredResourcesListByWorkspaceSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +/** + * Samples for DiscoveredResources ListByWorkspace. + */ +public final class DiscoveredResourcesListByWorkspaceSamples { + /* + * x-ms-original-file: 2026-05-01-preview/DiscoveredResources_ListByWorkspace.json + */ + /** + * Sample code: Get a list of discovered resources for a workspace. + * + * @param manager Entry point to ChaosManager. + */ + public static void + getAListOfDiscoveredResourcesForAWorkspace(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.discoveredResources() + .listByWorkspace("exampleRG", "exampleWorkspace", com.azure.core.util.Context.NONE); + } +} 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 b04013d63791..377d237912e8 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 @@ -9,7 +9,7 @@ */ public final class ExperimentsCancelSamples { /* - * x-ms-original-file: 2025-01-01/Experiments_Cancel.json + * x-ms-original-file: 2026-05-01-preview/Experiments_Cancel.json */ /** * Sample code: Cancel a running Experiment. 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 0ec0d68c734b..bce2bb9ca52f 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 @@ -8,6 +8,7 @@ import com.azure.resourcemanager.chaos.models.ChaosExperimentStep; import com.azure.resourcemanager.chaos.models.ChaosTargetListSelector; import com.azure.resourcemanager.chaos.models.ContinuousAction; +import com.azure.resourcemanager.chaos.models.CustomerDataStorageProperties; import com.azure.resourcemanager.chaos.models.KeyValuePair; import com.azure.resourcemanager.chaos.models.ManagedServiceIdentityType; import com.azure.resourcemanager.chaos.models.ResourceIdentity; @@ -23,7 +24,7 @@ */ public final class ExperimentsCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-01-01/Experiments_CreateOrUpdate.json + * x-ms-original-file: 2026-05-01-preview/Experiments_CreateOrUpdate.json */ /** * Sample code: Create/update a Experiment in a resource group. @@ -50,6 +51,9 @@ public static void createUpdateAExperimentInAResourceGroup(com.azure.resourceman "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/exampleVM/providers/Microsoft.Chaos/targets/Microsoft-VirtualMachine"))))) .withTags(mapOf("key7131", "fakeTokenPlaceholder", "key2138", "fakeTokenPlaceholder")) .withIdentity(new ResourceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED)) + .withCustomerDataStorage(new CustomerDataStorageProperties().withStorageAccountResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/exampleRG/providers/Microsoft.Storage/storageAccounts/exampleStorage") + .withBlobContainerName("azurechaosstudioexperiments")) .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 35dbd813091a..d17a0def9874 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 @@ -9,7 +9,7 @@ */ public final class ExperimentsDeleteSamples { /* - * x-ms-original-file: 2025-01-01/Experiments_Delete.json + * x-ms-original-file: 2026-05-01-preview/Experiments_Delete.json */ /** * Sample code: Delete a Experiment in a resource group. 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 97108c1a4a0b..e789b9a3ebf1 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 @@ -9,7 +9,7 @@ */ public final class ExperimentsExecutionDetailsSamples { /* - * x-ms-original-file: 2025-01-01/Experiments_ExecutionDetails.json + * x-ms-original-file: 2026-05-01-preview/Experiments_ExecutionDetails.json */ /** * Sample code: Get experiment execution details. 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 1e982a836e32..b4edacd8f7d2 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 @@ -9,7 +9,7 @@ */ public final class ExperimentsGetByResourceGroupSamples { /* - * x-ms-original-file: 2025-01-01/Experiments_Get.json + * x-ms-original-file: 2026-05-01-preview/Experiments_Get.json */ /** * Sample code: Get a Experiment in a resource group. 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 edda21944a1f..730190a2040d 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 @@ -9,7 +9,7 @@ */ public final class ExperimentsGetExecutionSamples { /* - * x-ms-original-file: 2025-01-01/Experiments_GetExecution.json + * x-ms-original-file: 2026-05-01-preview/Experiments_GetExecution.json */ /** * Sample code: Get the execution of a Experiment. 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 972d5c0f0135..f96690645d15 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 @@ -9,7 +9,7 @@ */ public final class ExperimentsListAllExecutionsSamples { /* - * x-ms-original-file: 2025-01-01/Experiments_ListAllExecutions.json + * x-ms-original-file: 2026-05-01-preview/Experiments_ListAllExecutions.json */ /** * Sample code: List all executions of an Experiment. 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 4dbdc25b1bb5..c884b66fc4c8 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 @@ -9,7 +9,7 @@ */ public final class ExperimentsListByResourceGroupSamples { /* - * x-ms-original-file: 2025-01-01/Experiments_List.json + * x-ms-original-file: 2026-05-01-preview/Experiments_List.json */ /** * Sample code: List all Experiments in a resource group. 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 e9eb0c30893f..2d8a934be0a6 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 @@ -9,7 +9,7 @@ */ public final class ExperimentsListSamples { /* - * x-ms-original-file: 2025-01-01/Experiments_ListAll.json + * x-ms-original-file: 2026-05-01-preview/Experiments_ListAll.json */ /** * Sample code: List all Experiments in a subscription. 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 43d0536d261c..afc266ebf664 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 @@ -9,7 +9,7 @@ */ public final class ExperimentsStartSamples { /* - * x-ms-original-file: 2025-01-01/Experiments_Start.json + * x-ms-original-file: 2026-05-01-preview/Experiments_Start.json */ /** * Sample code: Start a Experiment. 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 8dadd55715b0..ebc5bfcfddf5 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 @@ -16,7 +16,7 @@ */ public final class ExperimentsUpdateSamples { /* - * x-ms-original-file: 2025-01-01/Experiments_Update.json + * x-ms-original-file: 2026-05-01-preview/Experiments_Update.json */ /** * Sample code: Update an Experiment in a resource group. 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 b9aefa962c6b..0bc42a175e7a 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 @@ -9,7 +9,7 @@ */ public final class OperationStatusesGetSamples { /* - * x-ms-original-file: 2025-01-01/OperationStatuses_Get.json + * x-ms-original-file: 2026-05-01-preview/OperationStatuses_Get.json */ /** * Sample code: Gets Chaos Studio async operation status. diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesCreateOrUpdateSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..82639e35b9c6 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesCreateOrUpdateSamples.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.resourcemanager.chaos.models.PrivateAccessProperties; +import com.azure.resourcemanager.chaos.models.PublicNetworkAccessOption; + +/** + * Samples for PrivateAccesses CreateOrUpdate. + */ +public final class PrivateAccessesCreateOrUpdateSamples { + /* + * x-ms-original-file: + * 2026-05-01-preview/PrivateAccesses_CreateOrUpdate_Create_Or_Update_A_Private_Access_Resource.json + */ + /** + * Sample code: Create or Update a private access resource. + * + * @param manager Entry point to ChaosManager. + */ + public static void createOrUpdateAPrivateAccessResource(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.privateAccesses() + .define("myPrivateAccess") + .withRegion("centraluseuap") + .withExistingResourceGroup("myResourceGroup") + .withProperties(new PrivateAccessProperties()) + .create(); + } + + /* + * x-ms-original-file: 2026-05-01-preview/ + * PrivateAccesses_CreateOrUpdate_Create_Or_Update_A_Private_Access_Resource_With_Public_Network_Access.json + */ + /** + * Sample code: Create or Update a private access resource with publicNetworkAccess. + * + * @param manager Entry point to ChaosManager. + */ + public static void createOrUpdateAPrivateAccessResourceWithPublicNetworkAccess( + com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.privateAccesses() + .define("myPrivateAccess") + .withRegion("centraluseuap") + .withExistingResourceGroup("myResourceGroup") + .withProperties(new PrivateAccessProperties().withPublicNetworkAccess(PublicNetworkAccessOption.ENABLED)) + .create(); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesDeleteAPrivateEndpointConnectionSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesDeleteAPrivateEndpointConnectionSamples.java new file mode 100644 index 000000000000..f5e8b815fe0f --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesDeleteAPrivateEndpointConnectionSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +/** + * Samples for PrivateAccesses DeleteAPrivateEndpointConnection. + */ +public final class PrivateAccessesDeleteAPrivateEndpointConnectionSamples { + /* + * x-ms-original-file: 2026-05-01-preview/PrivateAccesses_DeleteAPrivateEndpointConnection.json + */ + /** + * Sample code: Delete a private endpoint connection under a private access resource. + * + * @param manager Entry point to ChaosManager. + */ + public static void deleteAPrivateEndpointConnectionUnderAPrivateAccessResource( + com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.privateAccesses() + .deleteAPrivateEndpointConnection("myResourceGroup", "myPrivateAccess", "myPrivateEndpointConnection", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesDeleteSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesDeleteSamples.java new file mode 100644 index 000000000000..7af66866c2ea --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +/** + * Samples for PrivateAccesses Delete. + */ +public final class PrivateAccessesDeleteSamples { + /* + * x-ms-original-file: 2026-05-01-preview/PrivateAccesses_Delete.json + */ + /** + * Sample code: Delete a private access resource. + * + * @param manager Entry point to ChaosManager. + */ + public static void deleteAPrivateAccessResource(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.privateAccesses().delete("myResourceGroup", "myPrivateAccess", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesGetAPrivateEndpointConnectionSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesGetAPrivateEndpointConnectionSamples.java new file mode 100644 index 000000000000..ee4e35c0a8ac --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesGetAPrivateEndpointConnectionSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +/** + * Samples for PrivateAccesses GetAPrivateEndpointConnection. + */ +public final class PrivateAccessesGetAPrivateEndpointConnectionSamples { + /* + * x-ms-original-file: 2026-05-01-preview/PrivateAccesses_GetAPrivateEndpointConnection.json + */ + /** + * Sample code: Get information about a private endpoint connection under a private access resource. + * + * @param manager Entry point to ChaosManager. + */ + public static void getInformationAboutAPrivateEndpointConnectionUnderAPrivateAccessResource( + com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.privateAccesses() + .getAPrivateEndpointConnectionWithResponse("myResourceGroup", "myPrivateAccess", + "myPrivateEndpointConnection", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesGetByResourceGroupSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesGetByResourceGroupSamples.java new file mode 100644 index 000000000000..67139b3a693c --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesGetByResourceGroupSamples.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +/** + * Samples for PrivateAccesses GetByResourceGroup. + */ +public final class PrivateAccessesGetByResourceGroupSamples { + /* + * x-ms-original-file: 2026-05-01-preview/PrivateAccesses_Get_Get_A_Private_Access_Resource.json + */ + /** + * Sample code: Get a private access resource. + * + * @param manager Entry point to ChaosManager. + */ + public static void getAPrivateAccessResource(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.privateAccesses() + .getByResourceGroupWithResponse("myResourceGroup", "myPrivateAccess", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * 2026-05-01-preview/PrivateAccesses_Get_Get_A_Private_Access_Resource_With_Private_Endpoint.json + */ + /** + * Sample code: Get a private access resource with private endpoint. + * + * @param manager Entry point to ChaosManager. + */ + public static void + getAPrivateAccessResourceWithPrivateEndpoint(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.privateAccesses() + .getByResourceGroupWithResponse("myResourceGroup", "myPrivateAccess", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesGetPrivateLinkResourcesSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesGetPrivateLinkResourcesSamples.java new file mode 100644 index 000000000000..80e55d97afcd --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesGetPrivateLinkResourcesSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +/** + * Samples for PrivateAccesses GetPrivateLinkResources. + */ +public final class PrivateAccessesGetPrivateLinkResourcesSamples { + /* + * x-ms-original-file: 2026-05-01-preview/PrivateAccesses_GetPrivateLinkResources.json + */ + /** + * Sample code: List all possible private link resources under private access resource. + * + * @param manager Entry point to ChaosManager. + */ + public static void listAllPossiblePrivateLinkResourcesUnderPrivateAccessResource( + com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.privateAccesses() + .getPrivateLinkResourcesWithResponse("myResourceGroup", "myPrivateAccess", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesListByResourceGroupSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesListByResourceGroupSamples.java new file mode 100644 index 000000000000..54d65c6350d4 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesListByResourceGroupSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +/** + * Samples for PrivateAccesses ListByResourceGroup. + */ +public final class PrivateAccessesListByResourceGroupSamples { + /* + * x-ms-original-file: 2026-05-01-preview/PrivateAccesses_List.json + */ + /** + * Sample code: List all private access in a resource group. + * + * @param manager Entry point to ChaosManager. + */ + public static void listAllPrivateAccessInAResourceGroup(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.privateAccesses().listByResourceGroup("myResourceGroup", null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesListPrivateEndpointConnectionsSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesListPrivateEndpointConnectionsSamples.java new file mode 100644 index 000000000000..0f7fd6e50c15 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesListPrivateEndpointConnectionsSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +/** + * Samples for PrivateAccesses ListPrivateEndpointConnections. + */ +public final class PrivateAccessesListPrivateEndpointConnectionsSamples { + /* + * x-ms-original-file: 2026-05-01-preview/PrivateAccesses_ListPrivateEndpointConnections.json + */ + /** + * Sample code: List all private endpoint connections under a private access resource. + * + * @param manager Entry point to ChaosManager. + */ + public static void listAllPrivateEndpointConnectionsUnderAPrivateAccessResource( + com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.privateAccesses() + .listPrivateEndpointConnections("myResourceGroup", "myPrivateAccess", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesListSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesListSamples.java new file mode 100644 index 000000000000..72cd2603ab49 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +/** + * Samples for PrivateAccesses List. + */ +public final class PrivateAccessesListSamples { + /* + * x-ms-original-file: 2026-05-01-preview/PrivateAccesses_ListAll.json + */ + /** + * Sample code: List all private accesses in a subscription. + * + * @param manager Entry point to ChaosManager. + */ + public static void listAllPrivateAccessesInASubscription(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.privateAccesses().list(null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesUpdateSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesUpdateSamples.java new file mode 100644 index 000000000000..19cdbc24ac7f --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesUpdateSamples.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.resourcemanager.chaos.models.PrivateAccess; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for PrivateAccesses Update. + */ +public final class PrivateAccessesUpdateSamples { + /* + * x-ms-original-file: 2026-05-01-preview/PrivateAccesses_Update.json + */ + /** + * Sample code: Update a private access resource's tags. + * + * @param manager Entry point to ChaosManager. + */ + public static void updateAPrivateAccessResourceSTags(com.azure.resourcemanager.chaos.ChaosManager manager) { + PrivateAccess resource = manager.privateAccesses() + .getByResourceGroupWithResponse("myResourceGroup", "myPrivateAccess", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsCreateOrUpdateSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..b8fdb4964eb4 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsCreateOrUpdateSamples.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.resourcemanager.chaos.models.ConfigurationExclusions; +import com.azure.resourcemanager.chaos.models.ConfigurationFilters; +import com.azure.resourcemanager.chaos.models.KeyValuePair; +import com.azure.resourcemanager.chaos.models.ScenarioConfigurationProperties; +import java.util.Arrays; + +/** + * Samples for ScenarioConfigurations CreateOrUpdate. + */ +public final class ScenarioConfigurationsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-05-01-preview/ScenarioConfigurations_CreateOrUpdate_With_Physical_Zones.json + */ + /** + * Sample code: Create or update a scenario configuration with physical zone targeting. + * + * @param manager Entry point to ChaosManager. + */ + public static void createOrUpdateAScenarioConfigurationWithPhysicalZoneTargeting( + com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.scenarioConfigurations() + .define("config-physical-zone") + .withExistingScenario("exampleRG", "exampleWorkspace", "12345678-1234-1234-1234-123456789012") + .withProperties(new ScenarioConfigurationProperties().withScenarioId( + "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Chaos/workspaces/exampleWorkspace/scenarios/12345678-1234-1234-1234-123456789012") + .withParameters(Arrays.asList(new KeyValuePair().withKey("fakeTokenPlaceholder").withValue("PT10M"))) + .withExclusions(new ConfigurationExclusions().withResources(Arrays.asList( + "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/protectedVM"))) + .withFilters(new ConfigurationFilters().withLocations(Arrays.asList("westus2")) + .withPhysicalZones(Arrays.asList("westus2-az1")))) + .create(); + } + + /* + * x-ms-original-file: 2026-05-01-preview/ScenarioConfigurations_CreateOrUpdate.json + */ + /** + * Sample code: Create or update a scenario configuration. + * + * @param manager Entry point to ChaosManager. + */ + public static void createOrUpdateAScenarioConfiguration(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.scenarioConfigurations() + .define("config-5678-9012-3456-789012345678") + .withExistingScenario("exampleRG", "exampleWorkspace", "12345678-1234-1234-1234-123456789012") + .withProperties(new ScenarioConfigurationProperties().withScenarioId( + "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Chaos/workspaces/exampleWorkspace/scenarios/12345678-1234-1234-1234-123456789012") + .withParameters(Arrays.asList(new KeyValuePair().withKey("fakeTokenPlaceholder").withValue("PT10M"), + new KeyValuePair().withKey("fakeTokenPlaceholder") + .withValue( + "[\"/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/vm1\",\"/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/vm2\"]"))) + .withExclusions(new ConfigurationExclusions().withResources(Arrays.asList( + "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/protectedVM")) + .withTags(Arrays.asList(new KeyValuePair().withKey("fakeTokenPlaceholder").withValue("production"))) + .withTypes(Arrays.asList("Microsoft.Compute/virtualMachineScaleSets"))) + .withFilters( + new ConfigurationFilters().withLocations(Arrays.asList("eastus")).withZones(Arrays.asList("1")))) + .create(); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsDeleteSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsDeleteSamples.java new file mode 100644 index 000000000000..5157e7b806a1 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsDeleteSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +/** + * Samples for ScenarioConfigurations Delete. + */ +public final class ScenarioConfigurationsDeleteSamples { + /* + * x-ms-original-file: 2026-05-01-preview/ScenarioConfigurations_Delete.json + */ + /** + * Sample code: Delete a scenario configuration. + * + * @param manager Entry point to ChaosManager. + */ + public static void deleteAScenarioConfiguration(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.scenarioConfigurations() + .delete("exampleRG", "exampleWorkspace", "12345678-1234-1234-1234-123456789012", + "config-5678-9012-3456-789012345678", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsExecuteSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsExecuteSamples.java new file mode 100644 index 000000000000..a69ac595f0d0 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsExecuteSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +/** + * Samples for ScenarioConfigurations Execute. + */ +public final class ScenarioConfigurationsExecuteSamples { + /* + * x-ms-original-file: 2026-05-01-preview/ScenarioConfigurations_Execute.json + */ + /** + * Sample code: Execute the scenario execution with the given scenario configuration. + * + * @param manager Entry point to ChaosManager. + */ + public static void executeTheScenarioExecutionWithTheGivenScenarioConfiguration( + com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.scenarioConfigurations() + .executeWithResponse("exampleRG", "exampleWorkspace", "12345678-1234-1234-1234-123456789012", + "config-5678-9012-3456-789012345678", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsFixResourcePermissionsSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsFixResourcePermissionsSamples.java new file mode 100644 index 000000000000..db6125ec7708 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsFixResourcePermissionsSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +/** + * Samples for ScenarioConfigurations FixResourcePermissions. + */ +public final class ScenarioConfigurationsFixResourcePermissionsSamples { + /* + * x-ms-original-file: 2026-05-01-preview/ScenarioConfigurations_FixResourcePermissions.json + */ + /** + * Sample code: Fixes resource permissions for the given scenario configuration. + * + * @param manager Entry point to ChaosManager. + */ + public static void + fixesResourcePermissionsForTheGivenScenarioConfiguration(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.scenarioConfigurations() + .fixResourcePermissions("exampleRG", "exampleWorkspace", "12345678-1234-1234-1234-123456789012", + "config-5678-9012-3456-789012345678", null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsGetSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsGetSamples.java new file mode 100644 index 000000000000..6f1855b315b7 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +/** + * Samples for ScenarioConfigurations Get. + */ +public final class ScenarioConfigurationsGetSamples { + /* + * x-ms-original-file: 2026-05-01-preview/ScenarioConfigurations_Get.json + */ + /** + * Sample code: Get a scenario configuration. + * + * @param manager Entry point to ChaosManager. + */ + public static void getAScenarioConfiguration(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.scenarioConfigurations() + .getWithResponse("exampleRG", "exampleWorkspace", "12345678-1234-1234-1234-123456789012", + "config-5678-9012-3456-789012345678", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsListAllSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsListAllSamples.java new file mode 100644 index 000000000000..589da9dea289 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsListAllSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +/** + * Samples for ScenarioConfigurations ListAll. + */ +public final class ScenarioConfigurationsListAllSamples { + /* + * x-ms-original-file: 2026-05-01-preview/ScenarioConfigurations_ListAll.json + */ + /** + * Sample code: Get a list of scenario configurations. + * + * @param manager Entry point to ChaosManager. + */ + public static void getAListOfScenarioConfigurations(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.scenarioConfigurations() + .listAll("exampleRG", "exampleWorkspace", "12345678-1234-1234-1234-123456789012", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsValidateSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsValidateSamples.java new file mode 100644 index 000000000000..c0d8219e2109 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsValidateSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +/** + * Samples for ScenarioConfigurations Validate. + */ +public final class ScenarioConfigurationsValidateSamples { + /* + * x-ms-original-file: 2026-05-01-preview/ScenarioConfigurations_Validate.json + */ + /** + * Sample code: Validate the given scenario configuration. + * + * @param manager Entry point to ChaosManager. + */ + public static void validateTheGivenScenarioConfiguration(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.scenarioConfigurations() + .validate("exampleRG", "exampleWorkspace", "12345678-1234-1234-1234-123456789012", + "config-5678-9012-3456-789012345678", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioRunsCancelSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioRunsCancelSamples.java new file mode 100644 index 000000000000..9692affef61f --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioRunsCancelSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +/** + * Samples for ScenarioRuns Cancel. + */ +public final class ScenarioRunsCancelSamples { + /* + * x-ms-original-file: 2026-05-01-preview/ScenarioRuns_Cancel.json + */ + /** + * Sample code: Cancel a running scenario run. + * + * @param manager Entry point to ChaosManager. + */ + public static void cancelARunningScenarioRun(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.scenarioRuns() + .cancelWithResponse("exampleRG", "exampleWorkspace", "12345678-1234-1234-1234-123456789012", + "abcd1234-5678-9012-3456-789012345678", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioRunsGetSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioRunsGetSamples.java new file mode 100644 index 000000000000..d6032884cf77 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioRunsGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +/** + * Samples for ScenarioRuns Get. + */ +public final class ScenarioRunsGetSamples { + /* + * x-ms-original-file: 2026-05-01-preview/ScenarioRuns_Get.json + */ + /** + * Sample code: Get a scenario run. + * + * @param manager Entry point to ChaosManager. + */ + public static void getAScenarioRun(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.scenarioRuns() + .getWithResponse("exampleRG", "exampleWorkspace", "12345678-1234-1234-1234-123456789012", + "abcd1234-5678-9012-3456-789012345678", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioRunsListAllSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioRunsListAllSamples.java new file mode 100644 index 000000000000..676e711038b4 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioRunsListAllSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +/** + * Samples for ScenarioRuns ListAll. + */ +public final class ScenarioRunsListAllSamples { + /* + * x-ms-original-file: 2026-05-01-preview/ScenarioRuns_ListAll.json + */ + /** + * Sample code: Get a list of scenario runs. + * + * @param manager Entry point to ChaosManager. + */ + public static void getAListOfScenarioRuns(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.scenarioRuns() + .listAll("exampleRG", "exampleWorkspace", "12345678-1234-1234-1234-123456789012", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenariosCreateOrUpdateSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenariosCreateOrUpdateSamples.java new file mode 100644 index 000000000000..00b36adfa5ff --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenariosCreateOrUpdateSamples.java @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.resourcemanager.chaos.models.ExternalResource; +import com.azure.resourcemanager.chaos.models.KeyValuePair; +import com.azure.resourcemanager.chaos.models.ParameterType; +import com.azure.resourcemanager.chaos.models.ScenarioAction; +import com.azure.resourcemanager.chaos.models.ScenarioParameter; +import com.azure.resourcemanager.chaos.models.ScenarioProperties; +import java.util.Arrays; + +/** + * Samples for Scenarios CreateOrUpdate. + */ +public final class ScenariosCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-05-01-preview/Scenarios_CreateOrUpdate.json + */ + /** + * Sample code: Create or update a scenario. + * + * @param manager Entry point to ChaosManager. + */ + public static void createOrUpdateAScenario(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.scenarios() + .define("zoneDownScenario") + .withExistingWorkspace("exampleRG", "exampleWorkspace") + .withProperties(new ScenarioProperties().withDescription( + "Induces an outage of all discovered VM and VMSS instances in the target zone with an option to invoke custom scripted actions using Automation Runbooks. Additionally, it forces failover of discovered Redis instances to simulate backend zonal outage.") + .withParameters(Arrays.asList( + new ScenarioParameter().withName("duration") + .withType(ParameterType.STRING) + .withDefaultProperty("PT15M") + .withRequired(false) + .withDescription("The duration of the outage scenario."), + new ScenarioParameter().withName("customRunbook1ResourceId") + .withType(ParameterType.STRING) + .withRequired(false) + .withDescription( + "Optional custom runbook 1 resource ID. If not provided, this action will be skipped."), + new ScenarioParameter().withName("customRunbook1ParametersJson") + .withType(ParameterType.STRING) + .withDefaultProperty("{}") + .withRequired(false) + .withDescription("Optional custom runbook 1 parameters in JSON format."))) + .withActions( + Arrays + .asList( + new ScenarioAction().withName("vmssZoneDown") + .withActionId("urn:csci:microsoft:compute:shutdown/1.0.0") + .withDescription("Force shutdown VMSS instances in target zone") + .withDuration("%%{parameters.duration}%%") + .withParameters(Arrays.asList(new KeyValuePair().withKey("fakeTokenPlaceholder") + .withValue("%%{filters.zones}%%"))), + new ScenarioAction().withName("vmZoneDown") + .withActionId("urn:csci:microsoft:compute:shutdown/1.0.0") + .withDescription("Force shutdown VM instances in target zone") + .withDuration("%%{parameters.duration}%%") + .withParameters(Arrays.asList(new KeyValuePair().withKey("fakeTokenPlaceholder") + .withValue("%%{filters.zones}%%"))), + new ScenarioAction() + .withName("redisFailover") + .withActionId("urn:csci:microsoft:azureClusteredCacheForRedis:Reboot/1.0.0") + .withDescription("Force failover of Redis instances to simulate backend zonal outage") + .withDuration("PT5M") + .withParameters( + Arrays.asList( + new KeyValuePair().withKey("fakeTokenPlaceholder").withValue("PrimaryNode"))), + new ScenarioAction().withName("custom-runbook-1") + .withActionId("urn:csci:microsoft:Automation:StartRunbook/1.0.0") + .withDescription("Custom Runbook 1") + .withDuration("PT30M") + .withParameters(Arrays.asList(new KeyValuePair() + .withKey("fakeTokenPlaceholder") + .withValue("%%{parameters.customRunbook1ParametersJson}%%"))) + .withExternalResource(new ExternalResource().withResourceId( + "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Automation/automationAccounts/exampleAutomationAccount/runbooks/exampleRunbook"))))) + .create(); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenariosDeleteSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenariosDeleteSamples.java new file mode 100644 index 000000000000..a9a586a15322 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenariosDeleteSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +/** + * Samples for Scenarios Delete. + */ +public final class ScenariosDeleteSamples { + /* + * x-ms-original-file: 2026-05-01-preview/Scenarios_Delete.json + */ + /** + * Sample code: Delete a Scenario in a workspace. + * + * @param manager Entry point to ChaosManager. + */ + public static void deleteAScenarioInAWorkspace(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.scenarios() + .deleteWithResponse("exampleRG", "exampleWorkspace", "myVMShutdownScenario", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenariosGetSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenariosGetSamples.java new file mode 100644 index 000000000000..c8a8b505dea8 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenariosGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +/** + * Samples for Scenarios Get. + */ +public final class ScenariosGetSamples { + /* + * x-ms-original-file: 2026-05-01-preview/Scenarios_Get.json + */ + /** + * Sample code: Get a scenario. + * + * @param manager Entry point to ChaosManager. + */ + public static void getAScenario(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.scenarios() + .getWithResponse("exampleRG", "exampleWorkspace", "zoneDownScenario", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenariosListAllSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenariosListAllSamples.java new file mode 100644 index 000000000000..c06ff7474679 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenariosListAllSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +/** + * Samples for Scenarios ListAll. + */ +public final class ScenariosListAllSamples { + /* + * x-ms-original-file: 2026-05-01-preview/Scenarios_ListAll.json + */ + /** + * Sample code: Get a list of scenarios. + * + * @param manager Entry point to ChaosManager. + */ + public static void getAListOfScenarios(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.scenarios().listAll("exampleRG", "exampleWorkspace", 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 e68e72c7ad82..3764e6f58dcf 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 @@ -9,7 +9,7 @@ */ public final class TargetTypesGetSamples { /* - * x-ms-original-file: 2025-01-01/TargetTypes_Get.json + * x-ms-original-file: 2026-05-01-preview/TargetTypes_Get.json */ /** * Sample code: Get a Target Type for westus2 location. 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 0147ed93b116..c3989b6ea744 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 @@ -9,7 +9,7 @@ */ public final class TargetTypesListSamples { /* - * x-ms-original-file: 2025-01-01/TargetTypes_List.json + * x-ms-original-file: 2026-05-01-preview/TargetTypes_List.json */ /** * Sample code: List all Target Types for westus2 location. 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 92be2532112d..39a5d17d1d45 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 @@ -13,7 +13,7 @@ */ public final class TargetsCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-01-01/Targets_CreateOrUpdate.json + * x-ms-original-file: 2026-05-01-preview/Targets_CreateOrUpdate.json */ /** * Sample code: Create/update a Target that extends a virtual machine resource. 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 57c24ce203bf..ecec48e9e951 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 @@ -9,7 +9,7 @@ */ public final class TargetsDeleteSamples { /* - * x-ms-original-file: 2025-01-01/Targets_Delete.json + * x-ms-original-file: 2026-05-01-preview/Targets_Delete.json */ /** * Sample code: Delete a Target that extends a virtual machine resource. 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 47a188328f45..0ac1fc116479 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 @@ -9,7 +9,7 @@ */ public final class TargetsGetSamples { /* - * x-ms-original-file: 2025-01-01/Targets_Get.json + * x-ms-original-file: 2026-05-01-preview/Targets_Get.json */ /** * Sample code: Get a Target that extends a virtual machine resource. 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 9aa2a5841faf..2c8fcefc4b7e 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 @@ -9,7 +9,7 @@ */ public final class TargetsListSamples { /* - * x-ms-original-file: 2025-01-01/Targets_List.json + * x-ms-original-file: 2026-05-01-preview/Targets_List.json */ /** * Sample code: List all Targets that extend a virtual machine resource. diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/WorkspacesCreateOrUpdateSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/WorkspacesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..9f1c71dc0ac4 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/WorkspacesCreateOrUpdateSamples.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.resourcemanager.chaos.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.chaos.models.ResourceIdentity; +import com.azure.resourcemanager.chaos.models.UserAssignedIdentity; +import com.azure.resourcemanager.chaos.models.WorkspaceProperties; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Workspaces CreateOrUpdate. + */ +public final class WorkspacesCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-05-01-preview/Workspaces_CreateOrUpdate.json + */ + /** + * Sample code: Create/update a workspace in a resource group. + * + * @param manager Entry point to ChaosManager. + */ + public static void createUpdateAWorkspaceInAResourceGroup(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.workspaces() + .define("exampleWorkspace") + .withRegion("westus2") + .withExistingResourceGroup("exampleRG") + .withProperties(new WorkspaceProperties().withScopes(Arrays + .asList("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/exampleResourceGroup"))) + .withTags(mapOf("environment", "production", "department", "engineering", "project", "chaos-testing")) + .withIdentity(new ResourceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/exampleResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleIdentity", + new UserAssignedIdentity()))) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/WorkspacesDeleteSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/WorkspacesDeleteSamples.java new file mode 100644 index 000000000000..9229bcc0e582 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/WorkspacesDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +/** + * Samples for Workspaces Delete. + */ +public final class WorkspacesDeleteSamples { + /* + * x-ms-original-file: 2026-05-01-preview/Workspaces_Delete.json + */ + /** + * Sample code: Delete a Workspace in a resource group. + * + * @param manager Entry point to ChaosManager. + */ + public static void deleteAWorkspaceInAResourceGroup(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.workspaces().delete("exampleRG", "exampleWorkspace", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/WorkspacesGetByResourceGroupSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/WorkspacesGetByResourceGroupSamples.java new file mode 100644 index 000000000000..fbcb7324c9fb --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/WorkspacesGetByResourceGroupSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +/** + * Samples for Workspaces GetByResourceGroup. + */ +public final class WorkspacesGetByResourceGroupSamples { + /* + * x-ms-original-file: 2026-05-01-preview/Workspaces_Get.json + */ + /** + * Sample code: Get a Workspace in a resource group. + * + * @param manager Entry point to ChaosManager. + */ + public static void getAWorkspaceInAResourceGroup(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.workspaces() + .getByResourceGroupWithResponse("exampleRG", "exampleWorkspace", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/WorkspacesListByResourceGroupSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/WorkspacesListByResourceGroupSamples.java new file mode 100644 index 000000000000..7b8e2d8676b0 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/WorkspacesListByResourceGroupSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +/** + * Samples for Workspaces ListByResourceGroup. + */ +public final class WorkspacesListByResourceGroupSamples { + /* + * x-ms-original-file: 2026-05-01-preview/Workspaces_List.json + */ + /** + * Sample code: List all Workspaces in a resource group. + * + * @param manager Entry point to ChaosManager. + */ + public static void listAllWorkspacesInAResourceGroup(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.workspaces().listByResourceGroup("exampleRG", null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/WorkspacesListSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/WorkspacesListSamples.java new file mode 100644 index 000000000000..56d8643a2331 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/WorkspacesListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +/** + * Samples for Workspaces List. + */ +public final class WorkspacesListSamples { + /* + * x-ms-original-file: 2026-05-01-preview/Workspaces_ListAll.json + */ + /** + * Sample code: List all Workspaces in a subscription. + * + * @param manager Entry point to ChaosManager. + */ + public static void listAllWorkspacesInASubscription(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.workspaces().list(null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/WorkspacesRefreshRecommendationsSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/WorkspacesRefreshRecommendationsSamples.java new file mode 100644 index 000000000000..d592d8547015 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/WorkspacesRefreshRecommendationsSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +/** + * Samples for Workspaces RefreshRecommendations. + */ +public final class WorkspacesRefreshRecommendationsSamples { + /* + * x-ms-original-file: 2026-05-01-preview/Workspaces_RefreshRecommendations.json + */ + /** + * Sample code: Refresh recommendations for all scenarios in a workspace. + * + * @param manager Entry point to ChaosManager. + */ + public static void + refreshRecommendationsForAllScenariosInAWorkspace(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.workspaces().refreshRecommendations("exampleRG", "exampleWorkspace", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/WorkspacesUpdateSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/WorkspacesUpdateSamples.java new file mode 100644 index 000000000000..7ef806981de9 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/WorkspacesUpdateSamples.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.resourcemanager.chaos.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.chaos.models.ResourceIdentity; +import com.azure.resourcemanager.chaos.models.UserAssignedIdentity; +import com.azure.resourcemanager.chaos.models.Workspace; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Workspaces Update. + */ +public final class WorkspacesUpdateSamples { + /* + * x-ms-original-file: 2026-05-01-preview/Workspaces_Update.json + */ + /** + * Sample code: Update a Workspace in a resource group. + * + * @param manager Entry point to ChaosManager. + */ + public static void updateAWorkspaceInAResourceGroup(com.azure.resourcemanager.chaos.ChaosManager manager) { + Workspace resource = manager.workspaces() + .getByResourceGroupWithResponse("exampleRG", "exampleWorkspace", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withTags(mapOf("environment", "production", "department", "engineering", "project", "chaos-testing")) + .withIdentity(new ResourceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/exampleResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleIdentity", + new UserAssignedIdentity()))) + .apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionDependencyTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionDependencyTests.java new file mode 100644 index 000000000000..801f5cee1d30 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionDependencyTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.chaos.models.ActionDependency; +import com.azure.resourcemanager.chaos.models.ActionDependencyType; +import com.azure.resourcemanager.chaos.models.ActionLifecycle; +import org.junit.jupiter.api.Assertions; + +public final class ActionDependencyTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ActionDependency model + = BinaryData.fromString("{\"type\":\"Action\",\"name\":\"nlvxbcuii\",\"onActionLifecycle\":\"Start\"}") + .toObject(ActionDependency.class); + Assertions.assertEquals(ActionDependencyType.ACTION, model.type()); + Assertions.assertEquals("nlvxbcuii", model.name()); + Assertions.assertEquals(ActionLifecycle.START, model.onActionLifecycle()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ActionDependency model = new ActionDependency().withType(ActionDependencyType.ACTION) + .withName("nlvxbcuii") + .withOnActionLifecycle(ActionLifecycle.START); + model = BinaryData.fromObject(model).toObject(ActionDependency.class); + Assertions.assertEquals(ActionDependencyType.ACTION, model.type()); + Assertions.assertEquals("nlvxbcuii", model.name()); + Assertions.assertEquals(ActionLifecycle.START, model.onActionLifecycle()); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionInnerTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionInnerTests.java new file mode 100644 index 000000000000..93e35e342bde --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionInnerTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.chaos.fluent.models.ActionInner; + +public final class ActionInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ActionInner model = BinaryData.fromString( + "{\"properties\":{\"canonicalId\":\"aifmvikl\",\"displayName\":\"dvk\",\"description\":\"ejd\",\"actionName\":\"xcv\",\"version\":\"rhnj\",\"actionType\":\"Discrete\",\"supportedTargetTypes\":[{\"targetType\":\"novqfzge\",\"requiredPermissions\":[\"ftul\",\"ltducea\",\"tmczuomejwcwwqi\"]}],\"parametersSchema\":{},\"recommendedRoles\":[\"sx\",\"ojmsvpkjprvkwc\"]},\"id\":\"ql\",\"name\":\"yxgtczh\",\"type\":\"ydbsd\"}") + .toObject(ActionInner.class); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionListResultTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionListResultTests.java new file mode 100644 index 000000000000..158bb64dad58 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionListResultTests.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.chaos.implementation.models.ActionListResult; +import org.junit.jupiter.api.Assertions; + +public final class ActionListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ActionListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"canonicalId\":\"nqqyba\",\"displayName\":\"euayjkqabqgzsles\",\"description\":\"bhernntiew\",\"actionName\":\"cv\",\"version\":\"uwrbehwagoh\",\"actionType\":\"Continuous\",\"supportedTargetTypes\":[{\"targetType\":\"rqemvvhmxt\",\"requiredPermissions\":[\"futacoebjvewzc\",\"znmwcp\",\"guaadraufactkahz\"]}],\"parametersSchema\":{},\"recommendedRoles\":[\"j\",\"iuxxpshneekulfg\",\"lqubkwdlen\"]},\"id\":\"sutujba\",\"name\":\"pjuohminyfl\",\"type\":\"orwmduvwpklv\"},{\"properties\":{\"canonicalId\":\"mygdxpgpqch\",\"displayName\":\"zepn\",\"description\":\"jcrxgibbdaxcon\",\"actionName\":\"zauorsuk\",\"version\":\"wbqpl\",\"actionType\":\"Discrete\",\"supportedTargetTypes\":[{\"targetType\":\"epzl\",\"requiredPermissions\":[\"wzsoldweyuqdunv\"]},{\"targetType\":\"nrwrbiork\",\"requiredPermissions\":[\"ywjhhgdnhx\",\"sivfomilo\"]},{\"targetType\":\"gdufiqnd\",\"requiredPermissions\":[\"zaofjchvcyy\",\"s\",\"gdotcubiipuipwo\",\"onmacjekniz\"]},{\"targetType\":\"qvci\",\"requiredPermissions\":[\"vfgmblrrilby\"]}],\"parametersSchema\":{},\"recommendedRoles\":[\"miccwrwfscjfnyn\",\"zqujizdvoqytiby\",\"wb\"]},\"id\":\"gyavu\",\"name\":\"pthjoxo\",\"type\":\"smsks\"},{\"properties\":{\"canonicalId\":\"iml\",\"displayName\":\"ljxkcgxxlx\",\"description\":\"fgcviz\",\"actionName\":\"dwl\",\"version\":\"lyoupfgfbkju\",\"actionType\":\"Cancelable\",\"supportedTargetTypes\":[{\"targetType\":\"fminsgowzf\",\"requiredPermissions\":[\"ttktlahbq\",\"ctxtgzukxi\",\"mmqtgqqqxhr\"]},{\"targetType\":\"rxcpjuisavo\",\"requiredPermissions\":[\"zfvazi\"]}],\"parametersSchema\":{},\"recommendedRoles\":[\"rqttbajlkatnw\",\"yiopi\",\"kqqfk\",\"vscx\"]},\"id\":\"mligov\",\"name\":\"brxk\",\"type\":\"mloazuru\"},{\"properties\":{\"canonicalId\":\"bgo\",\"displayName\":\"bteoybf\",\"description\":\"xakvvjgslor\",\"actionName\":\"lmywwtkgkxnyed\",\"version\":\"gyvudtjuewbc\",\"actionType\":\"Continuous\",\"supportedTargetTypes\":[{\"targetType\":\"hcjyxc\",\"requiredPermissions\":[\"vpayakkudzpx\"]},{\"targetType\":\"jplmagstcy\",\"requiredPermissions\":[\"fkyrk\",\"bdgiogsjk\",\"nwqjnoba\",\"yhddvia\"]},{\"targetType\":\"gfnmntfpmvmemfnc\",\"requiredPermissions\":[\"vvbalx\"]}],\"parametersSchema\":{},\"recommendedRoles\":[\"hpodbzev\"]},\"id\":\"dnhfuk\",\"name\":\"vsjcswsmystuluqy\",\"type\":\"fcvlerch\"}],\"nextLink\":\"bm\"}") + .toObject(ActionListResult.class); + Assertions.assertEquals("bm", model.nextLink()); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionPropertiesParametersSchemaTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionPropertiesParametersSchemaTests.java new file mode 100644 index 000000000000..7188272f18ca --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionPropertiesParametersSchemaTests.java @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.chaos.models.ActionPropertiesParametersSchema; + +public final class ActionPropertiesParametersSchemaTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ActionPropertiesParametersSchema model + = BinaryData.fromString("{}").toObject(ActionPropertiesParametersSchema.class); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionPropertiesTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionPropertiesTests.java new file mode 100644 index 000000000000..c781b4e03121 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionPropertiesTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.chaos.fluent.models.ActionProperties; + +public final class ActionPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ActionProperties model = BinaryData.fromString( + "{\"canonicalId\":\"m\",\"displayName\":\"maehvbbxurip\",\"description\":\"fnhtbaxkgxyw\",\"actionName\":\"kpyklyhp\",\"version\":\"odpvruudlgzib\",\"actionType\":\"Continuous\",\"supportedTargetTypes\":[{\"targetType\":\"ktst\",\"requiredPermissions\":[\"eclze\",\"qbcvhzlhplod\",\"kdl\",\"wqfbumlkxtrqjfsm\"]}],\"parametersSchema\":{},\"recommendedRoles\":[\"xhwgfwsrtaw\",\"oezbrhubsk\"]}") + .toObject(ActionProperties.class); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionSupportedTargetTypeTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionSupportedTargetTypeTests.java new file mode 100644 index 000000000000..1ef4728d6729 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionSupportedTargetTypeTests.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.chaos.models.ActionSupportedTargetType; +import org.junit.jupiter.api.Assertions; + +public final class ActionSupportedTargetTypeTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ActionSupportedTargetType model = BinaryData + .fromString("{\"targetType\":\"dyg\",\"requiredPermissions\":[\"kkqfqjbvle\",\"rfmluiqtq\",\"fa\"]}") + .toObject(ActionSupportedTargetType.class); + Assertions.assertEquals("dyg", model.targetType()); + Assertions.assertEquals("kkqfqjbvle", model.requiredPermissions().get(0)); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionVersionInnerTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionVersionInnerTests.java new file mode 100644 index 000000000000..862c9fb49c18 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionVersionInnerTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.chaos.fluent.models.ActionVersionInner; + +public final class ActionVersionInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ActionVersionInner model = BinaryData.fromString( + "{\"properties\":{\"canonicalId\":\"jbabwidf\",\"displayName\":\"sspuunnoxyhkx\",\"description\":\"ddrihpf\",\"actionName\":\"qcaaewdaomdjvl\",\"version\":\"x\",\"actionType\":\"Cancelable\",\"supportedTargetTypes\":[{\"targetType\":\"sgeivsiy\",\"requiredPermissions\":[\"dncj\",\"xonbzoggculapz\"]},{\"targetType\":\"rpgogtqxep\",\"requiredPermissions\":[\"b\"]},{\"targetType\":\"ajlyjtlvofqzhv\",\"requiredPermissions\":[\"byfmowuxr\",\"jpvd\"]},{\"targetType\":\"fzwiivwzjbhyz\",\"requiredPermissions\":[\"rkambt\",\"negvmnvuqe\",\"vldspa\",\"tjb\"]}],\"parametersSchema\":{},\"recommendedRoles\":[\"flvestmjlxrrilo\",\"apeewchpxlkt\"]},\"id\":\"uziycsl\",\"name\":\"vu\",\"type\":\"uztcktyhjtqed\"}") + .toObject(ActionVersionInner.class); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionVersionListResultTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionVersionListResultTests.java new file mode 100644 index 000000000000..04eb01530dfc --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionVersionListResultTests.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.chaos.implementation.models.ActionVersionListResult; +import org.junit.jupiter.api.Assertions; + +public final class ActionVersionListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ActionVersionListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"canonicalId\":\"ulwm\",\"displayName\":\"qzz\",\"description\":\"jvpglydzgk\",\"actionName\":\"qeevt\",\"version\":\"pryu\",\"actionType\":\"Cancelable\",\"supportedTargetTypes\":[{\"targetType\":\"zdmovzv\",\"requiredPermissions\":[\"awzqadfl\",\"z\",\"riglaec\"]},{\"targetType\":\"dticokpvzml\",\"requiredPermissions\":[\"ld\",\"x\",\"bf\"]},{\"targetType\":\"clnpkci\",\"requiredPermissions\":[\"riykhyawfvjlbox\",\"vkjlmxhom\"]},{\"targetType\":\"nhdwdigumbnra\",\"requiredPermissions\":[\"zptjazysd\"]}],\"parametersSchema\":{},\"recommendedRoles\":[\"wwvaiqyuvvfonk\",\"hhqyi\"]},\"id\":\"y\",\"name\":\"auy\",\"type\":\"vluwmncsttij\"},{\"properties\":{\"canonicalId\":\"bvpoekrsgsgbdhu\",\"displayName\":\"gnjdgkynscliqhz\",\"description\":\"xnkomtkubo\",\"actionName\":\"pnvdxz\",\"version\":\"ihfrbbcevqa\",\"actionType\":\"Cancelable\",\"supportedTargetTypes\":[{\"targetType\":\"lfkqojpy\",\"requiredPermissions\":[\"trdcnifmzzs\"]},{\"targetType\":\"m\",\"requiredPermissions\":[\"ysuxmprafwgck\",\"ocxvdfffwafqr\",\"udaspavehh\",\"vkbunzozudh\"]},{\"targetType\":\"gkmoyxcdyuibhmfd\",\"requiredPermissions\":[\"ydvfvfcjnae\",\"isrvhm\"]},{\"targetType\":\"r\",\"requiredPermissions\":[\"kiscvwmzhwpl\",\"faxvxil\",\"btgn\"]}],\"parametersSchema\":{},\"recommendedRoles\":[\"yqxtjjfzql\",\"hycav\",\"dggxdbeesmi\"]},\"id\":\"nlrariaawiuagy\",\"name\":\"wqfbylyrfgiagt\",\"type\":\"ojocqwogf\"},{\"properties\":{\"canonicalId\":\"jvusfzldmozux\",\"displayName\":\"fsbtkad\",\"description\":\"s\",\"actionName\":\"nbtgkbugrjqctoj\",\"version\":\"isofieypefojyqd\",\"actionType\":\"Cancelable\",\"supportedTargetTypes\":[{\"targetType\":\"plcwkhi\",\"requiredPermissions\":[\"lhzdsqtzb\",\"rgnowcjhfgm\",\"ecactx\",\"wotey\"]},{\"targetType\":\"cluqovekqvgqo\",\"requiredPermissions\":[\"fzmpjwyivq\",\"kfxcvhrfs\",\"huagrttikteusqc\"]}],\"parametersSchema\":{},\"recommendedRoles\":[\"klxubyja\",\"fmmfblcqcu\",\"bgq\",\"brta\"]},\"id\":\"etttwgdslqxihhr\",\"name\":\"ooizqseyp\",\"type\":\"iut\"}],\"nextLink\":\"apzhyrpetoge\"}") + .toObject(ActionVersionListResult.class); + Assertions.assertEquals("apzhyrpetoge", model.nextLink()); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionVersionsGetWithResponseMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionVersionsGetWithResponseMockTests.java new file mode 100644 index 000000000000..325e90efeff3 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionVersionsGetWithResponseMockTests.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.chaos.ChaosManager; +import com.azure.resourcemanager.chaos.models.ActionVersion; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ActionVersionsGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"canonicalId\":\"tudaw\",\"displayName\":\"jfel\",\"description\":\"rpptcbgqnzmnhiil\",\"actionName\":\"lwcjgckbbcccgzpr\",\"version\":\"xnyuffatsgftipwc\",\"actionType\":\"Discrete\",\"supportedTargetTypes\":[{\"targetType\":\"iqdxyurnpnuh\",\"requiredPermissions\":[\"ccnuhiig\",\"yl\",\"ui\"]}],\"parametersSchema\":{},\"recommendedRoles\":[\"atvcrkdlbnbq\",\"vhcs\"]},\"id\":\"zlwxaeaovur\",\"name\":\"xdndsbdweaderzm\",\"type\":\"ntopa\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ChaosManager manager = ChaosManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + ActionVersion response = manager.actionVersions() + .getWithResponse("ofqcvovjufycsjm", "bemyeji", "iuxegth", com.azure.core.util.Context.NONE) + .getValue(); + + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionVersionsListMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionVersionsListMockTests.java new file mode 100644 index 000000000000..cb6c9cc4d1e2 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionVersionsListMockTests.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.chaos.ChaosManager; +import com.azure.resourcemanager.chaos.models.ActionVersion; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ActionVersionsListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"canonicalId\":\"krlgjm\",\"displayName\":\"drvcqguef\",\"description\":\"ompheqdur\",\"actionName\":\"yujlfyoumpckyecl\",\"version\":\"igptajbrzmqxucyc\",\"actionType\":\"Continuous\",\"supportedTargetTypes\":[{\"targetType\":\"iutgj\",\"requiredPermissions\":[\"yzjdnrqjbt\"]},{\"targetType\":\"eaoqaqbzgyhf\",\"requiredPermissions\":[\"uatbwbqamteuliy\"]},{\"targetType\":\"pkcvmwf\",\"requiredPermissions\":[\"xe\"]},{\"targetType\":\"ywbo\",\"requiredPermissions\":[\"qmiciijqp\"]}],\"parametersSchema\":{},\"recommendedRoles\":[\"ojxjmcsmyqwix\",\"cp\",\"nkwywzwofa\"]},\"id\":\"ckduoiqtamtyvskn\",\"name\":\"rwzawnvs\",\"type\":\"cfhzagxnvhycv\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ChaosManager manager = ChaosManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response = manager.actionVersions() + .list("ttmvmmagoaqylkjz", "jiuazjc", "mxitpfinzcpd", com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionsGetWithResponseMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionsGetWithResponseMockTests.java new file mode 100644 index 000000000000..a490af118b0c --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionsGetWithResponseMockTests.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.chaos.ChaosManager; +import com.azure.resourcemanager.chaos.models.Action; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ActionsGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"canonicalId\":\"wnpqigtuujwouhd\",\"displayName\":\"s\",\"description\":\"rb\",\"actionName\":\"xsjybvitvqk\",\"version\":\"az\",\"actionType\":\"Cancelable\",\"supportedTargetTypes\":[{\"targetType\":\"m\",\"requiredPermissions\":[\"ch\",\"zfnkfexlvxno\",\"kizvoa\"]},{\"targetType\":\"naqln\",\"requiredPermissions\":[\"guyxlyk\",\"phvxz\",\"wxh\"]},{\"targetType\":\"ejtlk\",\"requiredPermissions\":[\"onwivkcqhrxhxkn\",\"ccrmmk\",\"upijubyqjfkakfq\",\"rke\"]}],\"parametersSchema\":{},\"recommendedRoles\":[\"dudxjascowvfdjk\",\"dxphlk\",\"snmgzvyfi\"]},\"id\":\"kzuqnwsith\",\"name\":\"q\",\"type\":\"ly\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ChaosManager manager = ChaosManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + Action response + = manager.actions().getWithResponse("pl", "dbmairrhvhfnr", com.azure.core.util.Context.NONE).getValue(); + + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionsListMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionsListMockTests.java new file mode 100644 index 000000000000..69397bf7fbf5 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionsListMockTests.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.chaos.ChaosManager; +import com.azure.resourcemanager.chaos.models.Action; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ActionsListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"canonicalId\":\"vqqugdrftbcv\",\"displayName\":\"reuquowtljvf\",\"description\":\"reagkhyxvrqt\",\"actionName\":\"czsulmdggl\",\"version\":\"pjpfseykgs\",\"actionType\":\"Continuous\",\"supportedTargetTypes\":[{\"targetType\":\"n\",\"requiredPermissions\":[\"p\",\"ylkvecjuj\"]},{\"targetType\":\"goadyedmzr\",\"requiredPermissions\":[\"oknub\",\"oitpkpztrgdgx\",\"coqra\"]},{\"targetType\":\"ugyxpqit\",\"requiredPermissions\":[\"alwvskbu\",\"z\"]}],\"parametersSchema\":{},\"recommendedRoles\":[\"ty\",\"tco\",\"cujp\"]},\"id\":\"xzak\",\"name\":\"ejkm\",\"type\":\"bizt\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ChaosManager manager = ChaosManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response + = manager.actions().list("hluqwquls", "trjbhxykfhyq", 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 8a07de131ff2..251523d0f7c8 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 @@ -21,7 +21,7 @@ public final class CapabilitiesCreateOrUpdateWithResponseMockTests { @Test public void testCreateOrUpdateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"publisher\":\"jmqlgkfb\",\"targetType\":\"doaon\",\"description\":\"jcntuj\",\"parametersSchema\":\"c\",\"urn\":\"df\"},\"id\":\"waezkojvd\",\"name\":\"pzfoqoui\",\"type\":\"ybxarzgszu\"}"; + = "{\"properties\":{\"publisher\":\"dt\",\"targetType\":\"epu\",\"description\":\"vyjtcvu\",\"parametersSchema\":\"asiz\",\"urn\":\"sfuughtuqfecjx\",\"provisioningState\":\"Canceled\"},\"id\":\"uhxu\",\"name\":\"cbuewmrswnjlxuz\",\"type\":\"hwpusxj\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,8 +31,8 @@ public void testCreateOrUpdateWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Capability response = manager.capabilities() - .createOrUpdateWithResponse("lxorjaltolmncws", "bqwcsdbnwdcf", "ucqdpfuvglsb", "jcanvxbvtvudut", "cormr", - "xqtvcofu", new CapabilityInner(), com.azure.core.util.Context.NONE) + .createOrUpdateWithResponse("pnulaiywzej", "whslwkoj", "llndnpd", "rpqaf", "fugsnnfhyetefy", "oc", + 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 944fd6ce5431..b445ed7c4ae7 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 @@ -28,8 +28,8 @@ public void testDeleteWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.capabilities() - .deleteWithResponse("oxciqopidoamcio", "hkh", "zxkhnzbonlwnto", "gokdwbwhks", "zcmrvexztvb", - "qgsfraoyzkoow", com.azure.core.util.Context.NONE); + .deleteWithResponse("aqehg", "dohzjq", "tu", "o", "gebx", "cnwfepbnwgfmxjg", + 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 58d6d5a30fa0..29bd30200404 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 @@ -20,7 +20,7 @@ public final class CapabilitiesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"publisher\":\"ervtiagxs\",\"targetType\":\"zuempsbzkf\",\"description\":\"eyvpnqicvinvkj\",\"parametersSchema\":\"dxrbuukzcle\",\"urn\":\"hmlwpaztzpo\"},\"id\":\"cckwyfzqwhxxbu\",\"name\":\"qa\",\"type\":\"zfeqztppri\"}"; + = "{\"properties\":{\"publisher\":\"wrsnewmozqvbu\",\"targetType\":\"ma\",\"description\":\"sycxhxzgaz\",\"parametersSchema\":\"abo\",\"urn\":\"vmfqhppubo\",\"provisioningState\":\"Failed\"},\"id\":\"dfgkmtdh\",\"name\":\"rngbtcjuahokqtob\",\"type\":\"auxofshfph\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,8 +30,8 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Capability response = manager.capabilities() - .getWithResponse("ooaojkniodkooebw", "ujhemmsbvdkcrodt", "infwjlfltkacjve", "kdlfoa", "ggkfpagaowpul", - "qblylsyxkqj", com.azure.core.util.Context.NONE) + .getWithResponse("dndviauogp", "uartvti", "kyefchnmnahmnxhk", "jqirwrw", "ooxf", "i", + 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 f7c5860f1fd2..76b36dc91fa7 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 @@ -21,7 +21,7 @@ public final class CapabilitiesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"publisher\":\"zev\",\"targetType\":\"hewpusdsttwv\",\"description\":\"vbbejdcng\",\"parametersSchema\":\"m\",\"urn\":\"kufgmj\"},\"id\":\"wr\",\"name\":\"grtwae\",\"type\":\"u\"}]}"; + = "{\"value\":[{\"properties\":{\"publisher\":\"wcegyamlbn\",\"targetType\":\"qa\",\"description\":\"jvpilguooqja\",\"parametersSchema\":\"d\",\"urn\":\"gueiookjbsahrtdt\",\"provisioningState\":\"Failed\"},\"id\":\"qacsl\",\"name\":\"otoebnfxofv\",\"type\":\"jkgd\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,7 +31,7 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.capabilities() - .list("lmnguxaw", "aldsy", "uximerqfobw", "znkbykutwpfhpagm", "r", "kdsnfdsdoakgtdl", + .list("g", "jbgdlfgtdysnaquf", "qbctqha", "zjrwdkqze", "yjleziunjx", "fza", 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 6a8d58f48e60..4a00b144f1ae 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 @@ -11,7 +11,7 @@ public final class CapabilityInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CapabilityInner model = BinaryData.fromString( - "{\"properties\":{\"publisher\":\"hq\",\"targetType\":\"gjxpybczmehmt\",\"description\":\"pbsphrupidgs\",\"parametersSchema\":\"bejhphoycmsxa\",\"urn\":\"hdxbmtqio\"},\"id\":\"zehtbmu\",\"name\":\"p\",\"type\":\"wnoi\"}") + "{\"properties\":{\"publisher\":\"hq\",\"targetType\":\"gjxpybczmehmt\",\"description\":\"pbsphrupidgs\",\"parametersSchema\":\"bejhphoycmsxa\",\"urn\":\"hdxbmtqio\",\"provisioningState\":\"Deleting\"},\"id\":\"htbmuf\",\"name\":\"ownoizhw\",\"type\":\"rxybqsoq\"}") .toObject(CapabilityInner.class); } 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 e377a730710d..76ed6f49e524 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 @@ -12,8 +12,8 @@ public final class CapabilityListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CapabilityListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"publisher\":\"sqe\",\"targetType\":\"agdfmglzlh\",\"description\":\"rifkwm\",\"parametersSchema\":\"ktsizntocipaou\",\"urn\":\"psqucmpoyf\"},\"id\":\"fogknygjofjdde\",\"name\":\"s\",\"type\":\"deupewnwrei\"},{\"properties\":{\"publisher\":\"yflusarhmofc\",\"targetType\":\"smy\",\"description\":\"kdtmlxhekuk\",\"parametersSchema\":\"txukcdmp\",\"urn\":\"cryuan\"},\"id\":\"uxzdxtay\",\"name\":\"lhmwhfpmrqobm\",\"type\":\"u\"}],\"nextLink\":\"nryrtihf\"}") + "{\"value\":[{\"properties\":{\"publisher\":\"rifkwm\",\"targetType\":\"ktsizntocipaou\",\"description\":\"psqucmpoyf\",\"parametersSchema\":\"fogknygjofjdde\",\"urn\":\"rd\",\"provisioningState\":\"Failed\"},\"id\":\"wnw\",\"name\":\"eitjz\",\"type\":\"flusarhmof\"},{\"properties\":{\"publisher\":\"smy\",\"targetType\":\"kdtmlxhekuk\",\"description\":\"txukcdmp\",\"parametersSchema\":\"cryuan\",\"urn\":\"uxzdxtay\",\"provisioningState\":\"Succeeded\"},\"id\":\"whfpmrqobmtu\",\"name\":\"knryrtihfxtij\",\"type\":\"pzvgnwzsymglzufc\"}],\"nextLink\":\"kohdbiha\"}") .toObject(CapabilityListResult.class); - Assertions.assertEquals("nryrtihf", model.nextLink()); + Assertions.assertEquals("kohdbiha", model.nextLink()); } } 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 b64bab1f7515..0a9f7e450652 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 @@ -11,7 +11,7 @@ public final class CapabilityPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CapabilityProperties model = BinaryData.fromString( - "{\"publisher\":\"wlrxyb\",\"targetType\":\"oqijgkdmbpaz\",\"description\":\"bc\",\"parametersSchema\":\"pdznrbtcqqjnqgl\",\"urn\":\"gnufoooj\"}") + "{\"publisher\":\"gkdmb\",\"targetType\":\"zlobcufpd\",\"description\":\"rbt\",\"parametersSchema\":\"qjnqglhqgnufoooj\",\"urn\":\"ifsqesaagdfmg\",\"provisioningState\":\"Failed\"}") .toObject(CapabilityProperties.class); } 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 b21bf5958822..73cf4b0670a0 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,7 +11,7 @@ public final class CapabilityTypeInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CapabilityTypeInner model = BinaryData.fromString( - "{\"properties\":{\"publisher\":\"ppdsbdkvwrwj\",\"targetType\":\"usnhutje\",\"displayName\":\"mrldhu\",\"description\":\"zzd\",\"parametersSchema\":\"qxhocdgeablgphut\",\"urn\":\"ndv\",\"kind\":\"ozwyiftyhxhuro\",\"azureRbacActions\":[\"yxolniwp\",\"cukjf\",\"giawx\"],\"azureRbacDataActions\":[\"ypl\",\"ckbasyypndd\",\"sgcbac\",\"hejkotynqgou\"],\"requiredAzureRoleDefinitionIds\":[\"dlikwyqkgfgibma\",\"gakeqsr\"],\"runtimeProperties\":{\"kind\":\"zqqedq\"}},\"id\":\"bciqfouflm\",\"name\":\"nkzsmodmglou\",\"type\":\"pbkwtmu\"}") + "{\"properties\":{\"publisher\":\"wtnhxbnjbiksqr\",\"targetType\":\"ssainqpjwnzll\",\"displayName\":\"mppeebvmgxs\",\"description\":\"kyqduujit\",\"parametersSchema\":\"czdzev\",\"urn\":\"hkr\",\"kind\":\"d\",\"azureRbacActions\":[\"dsbdkvwrwjf\"],\"azureRbacDataActions\":[\"nhutjeltmrldhugj\"],\"requiredAzureRoleDefinitionIds\":[\"atqxho\",\"dgeablgphu\",\"icndvkaozwyifty\",\"xhurok\"],\"runtimeProperties\":{\"kind\":\"xolniwpwcukjfk\"}},\"id\":\"awxklr\",\"name\":\"plwckbas\",\"type\":\"ypnddhsgcb\"}") .toObject(CapabilityTypeInner.class); } } 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 0bd9806c5690..0378162124e0 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 @@ -12,8 +12,8 @@ public final class CapabilityTypeListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CapabilityTypeListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"publisher\":\"mwisdkfthwxmnt\",\"targetType\":\"waopvkmijcmmxd\",\"displayName\":\"fufsrpymzi\",\"description\":\"sezcxtb\",\"parametersSchema\":\"gfycc\",\"urn\":\"ewmdw\",\"kind\":\"eiachboosflnr\",\"azureRbacActions\":[\"qpteeh\",\"zvypyqrimzinp\"],\"azureRbacDataActions\":[\"jdkirsoodqx\"],\"requiredAzureRoleDefinitionIds\":[\"mnoh\",\"t\"],\"runtimeProperties\":{\"kind\":\"h\"}},\"id\":\"oifiyipjxsqwpgr\",\"name\":\"bznorcjxvsnby\",\"type\":\"qabnmoc\"},{\"properties\":{\"publisher\":\"shurzafbljjgpbto\",\"targetType\":\"jmkljavbqidtqajz\",\"displayName\":\"l\",\"description\":\"u\",\"parametersSchema\":\"krlkhbzhfepg\",\"urn\":\"qex\",\"kind\":\"ocxscpaierhhbcs\",\"azureRbacActions\":[\"mmajtjaodx\",\"bnbdxkqpxokajion\",\"imexgstxgcpodgma\"],\"azureRbacDataActions\":[\"mvdjwzrlovmc\"],\"requiredAzureRoleDefinitionIds\":[\"ijcoejctb\",\"aqsqsycbkbfk\"],\"runtimeProperties\":{\"kind\":\"dkexxppofm\"}},\"id\":\"x\",\"name\":\"fjpgddtocjjxhvp\",\"type\":\"o\"}],\"nextLink\":\"xhdzxibqeojnx\"}") + "{\"value\":[{\"properties\":{\"publisher\":\"wrlyxwjkcprb\",\"targetType\":\"b\",\"displayName\":\"jvtbvpyss\",\"description\":\"nruj\",\"parametersSchema\":\"uhmuouqfprwzwbn\",\"urn\":\"itnwuizgazxufi\",\"kind\":\"ckyfih\",\"azureRbacActions\":[\"dfvzwdzuhty\"],\"azureRbacDataActions\":[\"sdkf\",\"hwxmnteiwa\",\"pvkmijcmmxdcuf\",\"fsrpymzidnse\"],\"requiredAzureRoleDefinitionIds\":[\"tbzsgfyccs\",\"ewmdw\",\"jeiachboosfl\",\"ro\"],\"runtimeProperties\":{\"kind\":\"pteehzzv\"}},\"id\":\"yqrimzin\",\"name\":\"vswjdk\",\"type\":\"rsoodqxhcrmnoh\"},{\"properties\":{\"publisher\":\"kwh\",\"targetType\":\"oifiyipjxsqwpgr\",\"displayName\":\"znorcj\",\"description\":\"snb\",\"parametersSchema\":\"qabnmoc\",\"urn\":\"ysh\",\"kind\":\"zafb\",\"azureRbacActions\":[\"gpbtoqcjmklj\"],\"azureRbacDataActions\":[\"qidtqajzyu\",\"pku\"],\"requiredAzureRoleDefinitionIds\":[\"rlkhbzhfepgzgq\",\"xzlocxscp\",\"ierhhbcsglummaj\"],\"runtimeProperties\":{\"kind\":\"odxobnbdxkqpxok\"}},\"id\":\"ionpimexg\",\"name\":\"txgcpodgmaajr\",\"type\":\"vdjwzrlovm\"},{\"properties\":{\"publisher\":\"hijco\",\"targetType\":\"ctbzaq\",\"displayName\":\"sycbkbfk\",\"description\":\"kdkexxp\",\"parametersSchema\":\"fmxa\",\"urn\":\"fjpgddtocjjxhvp\",\"kind\":\"uexhdzx\",\"azureRbacActions\":[\"eojnxqbzvddn\",\"wndeicbtwnp\",\"aoqvuh\",\"hcffcyddglmjthjq\"],\"azureRbacDataActions\":[\"yeicxmqciwqvhk\",\"ixuigdtopbobj\"],\"requiredAzureRoleDefinitionIds\":[\"m\"],\"runtimeProperties\":{\"kind\":\"a\"}},\"id\":\"uhrzayvvt\",\"name\":\"gvdfgiotkftutq\",\"type\":\"ln\"}],\"nextLink\":\"lefgugnxk\"}") .toObject(CapabilityTypeListResult.class); - Assertions.assertEquals("xhdzxibqeojnx", model.nextLink()); + Assertions.assertEquals("lefgugnxk", model.nextLink()); } } 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 92300441ec61..afb48dd8f9a9 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,7 +10,7 @@ public final class CapabilityTypePropertiesRuntimePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - CapabilityTypePropertiesRuntimeProperties model = BinaryData.fromString("{\"kind\":\"rfidfvzwdz\"}") - .toObject(CapabilityTypePropertiesRuntimeProperties.class); + CapabilityTypePropertiesRuntimeProperties model + = BinaryData.fromString("{\"kind\":\"eju\"}").toObject(CapabilityTypePropertiesRuntimeProperties.class); } } 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 147403184e57..115c5144e2fe 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 @@ -11,7 +11,7 @@ public final class CapabilityTypePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CapabilityTypeProperties model = BinaryData.fromString( - "{\"publisher\":\"uqktap\",\"targetType\":\"wgcu\",\"displayName\":\"tumkdosvqwhbm\",\"description\":\"bbjfddgmbmbexp\",\"parametersSchema\":\"htqqrolfp\",\"urn\":\"s\",\"kind\":\"gbquxigj\",\"azureRbacActions\":[\"zjaoyfhrtxil\",\"erkujys\",\"l\",\"juvf\"],\"azureRbacDataActions\":[\"rlyxwjkcprbnw\",\"xgjvtbv\",\"ysszdnrujqguh\"],\"requiredAzureRoleDefinitionIds\":[\"uqfprwzw\",\"nguitnwuizgazxu\"],\"runtimeProperties\":{\"kind\":\"uckyf\"}}") + "{\"publisher\":\"phejkotynqgoulz\",\"targetType\":\"likwyqkgfgib\",\"displayName\":\"dgak\",\"description\":\"s\",\"parametersSchema\":\"yb\",\"urn\":\"qedqytbciqfoufl\",\"kind\":\"nkzsmodmglou\",\"azureRbacActions\":[\"kwtmutduqktapspw\"],\"azureRbacDataActions\":[\"ertumkdo\",\"vqwhbmdgbbjfd\"],\"requiredAzureRoleDefinitionIds\":[\"bmbexppbhtqqro\",\"fpfpsalgbquxigj\",\"jgzjaoyfhrtx\"],\"runtimeProperties\":{\"kind\":\"erkujys\"}}") .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 c283e7b50482..8bc07bbf54ba 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 @@ -20,7 +20,7 @@ public final class CapabilityTypesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"publisher\":\"orwkqnyh\",\"targetType\":\"ij\",\"displayName\":\"ivfxzsjabibsyst\",\"description\":\"fsdjpvkvp\",\"parametersSchema\":\"xbkzbzkdvncj\",\"urn\":\"udurgkakmokz\",\"kind\":\"jk\",\"azureRbacActions\":[\"hmouwqlgzrfze\",\"yebizikayuh\"],\"azureRbacDataActions\":[\"jbsybbqw\",\"vtldgmfpgvmpip\"],\"requiredAzureRoleDefinitionIds\":[\"thaqfxssmwu\"],\"runtimeProperties\":{\"kind\":\"dsrezpdrhneuyow\"}},\"id\":\"d\",\"name\":\"ytisibir\",\"type\":\"gpikpzimejza\"}"; + = "{\"properties\":{\"publisher\":\"bdxnaz\",\"targetType\":\"kml\",\"displayName\":\"evfxzopjhbzxlioh\",\"description\":\"dd\",\"parametersSchema\":\"gxqbawpcb\",\"urn\":\"zqcyknap\",\"kind\":\"fyuicdh\",\"azureRbacActions\":[\"ybww\"],\"azureRbacDataActions\":[\"vibidmhmwffpl\"],\"requiredAzureRoleDefinitionIds\":[\"vapckccrrvwey\"],\"runtimeProperties\":{\"kind\":\"yyukphaimmo\"}},\"id\":\"oqboshbragapyyr\",\"name\":\"fsv\",\"type\":\"pavbo\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); CapabilityType response = manager.capabilityTypes() - .getWithResponse("p", "kghv", "ndzwmkrefa", com.azure.core.util.Context.NONE) + .getWithResponse("tlyo", "rrrouuxvnsa", "bcrymodizrx", com.azure.core.util.Context.NONE) .getValue(); } 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 0b1a90cae83c..a8bad7e978d7 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 @@ -21,7 +21,7 @@ public final class CapabilityTypesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"publisher\":\"lazszrn\",\"targetType\":\"iin\",\"displayName\":\"pwp\",\"description\":\"lwbtlhf\",\"parametersSchema\":\"jcdh\",\"urn\":\"fjvfbgofeljagr\",\"kind\":\"qhl\",\"azureRbacActions\":[\"iiiojnalghf\",\"vtvsexsowueluq\",\"hahhxvrhmzkwpj\",\"wws\"],\"azureRbacDataActions\":[\"hftqsxhqxujxukn\",\"xdigrjg\",\"ufzdmsyq\",\"fi\"],\"requiredAzureRoleDefinitionIds\":[\"botzingamvppho\",\"zqzudph\",\"amvdkfwynwcvtbv\",\"ayhmtnvyqiatkz\"],\"runtimeProperties\":{\"kind\":\"npwzcjaes\"}},\"id\":\"v\",\"name\":\"ccyajg\",\"type\":\"qfhwyg\"}]}"; + = "{\"value\":[{\"properties\":{\"publisher\":\"qepvufhbzeh\",\"targetType\":\"hoqhnl\",\"displayName\":\"nbldxeaclgschori\",\"description\":\"rsrrmoucsofldp\",\"parametersSchema\":\"iyfc\",\"urn\":\"beolh\",\"kind\":\"lvbmxuqibsxtkcu\",\"azureRbacActions\":[\"sfar\"],\"azureRbacDataActions\":[\"owlkjxnqpv\"],\"requiredAzureRoleDefinitionIds\":[\"stmhqykizmd\",\"saoafcluqvox\",\"ycjimryvwgcwwpbm\",\"gwe\"],\"runtimeProperties\":{\"kind\":\"sxwef\"}},\"id\":\"ecb\",\"name\":\"opwndyqleallk\",\"type\":\"mtkhlowkxxpvbr\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,7 +31,7 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.capabilityTypes().list("lfzxiavrmbzonoki", "rjqc", "rgz", com.azure.core.util.Context.NONE); + = manager.capabilityTypes().list("fppdbwnu", "gahxkumasjcaa", "fdmmcpug", com.azure.core.util.Context.NONE); } } 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 32ec67eaa97f..3d85ceeccb74 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 @@ -12,15 +12,15 @@ public final class ChaosExperimentActionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ChaosExperimentAction model - = BinaryData.fromString("{\"type\":\"ChaosExperimentAction\",\"name\":\"ewrmjmwvvjektc\"}") + = BinaryData.fromString("{\"type\":\"ChaosExperimentAction\",\"name\":\"frzpwvlqdqgb\"}") .toObject(ChaosExperimentAction.class); - Assertions.assertEquals("ewrmjmwvvjektc", model.name()); + Assertions.assertEquals("frzpwvlqdqgb", model.name()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ChaosExperimentAction model = new ChaosExperimentAction().withName("ewrmjmwvvjektc"); + ChaosExperimentAction model = new ChaosExperimentAction().withName("frzpwvlqdqgb"); model = BinaryData.fromObject(model).toObject(ChaosExperimentAction.class); - Assertions.assertEquals("ewrmjmwvvjektc", model.name()); + Assertions.assertEquals("frzpwvlqdqgb", 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 cabc7420c587..5ffd335f5b71 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,20 +13,21 @@ public final class ChaosExperimentBranchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ChaosExperimentBranch model = BinaryData - .fromString( - "{\"name\":\"oklyaxuconuq\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"fkbey\"}]}") + ChaosExperimentBranch model = BinaryData.fromString( + "{\"name\":\"zf\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"eyp\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"wrmjmwvvjektc\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"senhwlrs\"}]}") .toObject(ChaosExperimentBranch.class); - Assertions.assertEquals("oklyaxuconuq", model.name()); - Assertions.assertEquals("fkbey", model.actions().get(0).name()); + Assertions.assertEquals("zf", model.name()); + Assertions.assertEquals("eyp", model.actions().get(0).name()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ChaosExperimentBranch model = new ChaosExperimentBranch().withName("oklyaxuconuq") - .withActions(Arrays.asList(new ChaosExperimentAction().withName("fkbey"))); + ChaosExperimentBranch model = new ChaosExperimentBranch().withName("zf") + .withActions(Arrays.asList(new ChaosExperimentAction().withName("eyp"), + new ChaosExperimentAction().withName("wrmjmwvvjektc"), + new ChaosExperimentAction().withName("senhwlrs"))); model = BinaryData.fromObject(model).toObject(ChaosExperimentBranch.class); - Assertions.assertEquals("oklyaxuconuq", model.name()); - Assertions.assertEquals("fkbey", model.actions().get(0).name()); + Assertions.assertEquals("zf", model.name()); + Assertions.assertEquals("eyp", 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 c9787a56f10c..d304d498057d 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 @@ -15,23 +15,28 @@ public final class ChaosExperimentStepTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ChaosExperimentStep model = BinaryData.fromString( - "{\"name\":\"zoqftiyqzrnkcqvy\",\"branches\":[{\"name\":\"whzlsicohoq\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"wvl\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"yav\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"hheunmmqhgyx\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"konocu\"}]}]}") + "{\"name\":\"hwankixzbinjepu\",\"branches\":[{\"name\":\"mryw\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"zoqftiyqzrnkcqvy\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"lwh\"}]},{\"name\":\"lsicohoqqnwv\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"yav\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"hheunmmqhgyx\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"konocu\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"oklyaxuconuq\"}]}]}") .toObject(ChaosExperimentStep.class); - Assertions.assertEquals("zoqftiyqzrnkcqvy", model.name()); - Assertions.assertEquals("whzlsicohoq", model.branches().get(0).name()); - Assertions.assertEquals("wvl", model.branches().get(0).actions().get(0).name()); + Assertions.assertEquals("hwankixzbinjepu", model.name()); + Assertions.assertEquals("mryw", model.branches().get(0).name()); + Assertions.assertEquals("zoqftiyqzrnkcqvy", model.branches().get(0).actions().get(0).name()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ChaosExperimentStep model = new ChaosExperimentStep().withName("zoqftiyqzrnkcqvy") - .withBranches(Arrays.asList(new ChaosExperimentBranch().withName("whzlsicohoq") - .withActions(Arrays.asList(new ChaosExperimentAction().withName("wvl"), - new ChaosExperimentAction().withName("yav"), new ChaosExperimentAction().withName("hheunmmqhgyx"), - new ChaosExperimentAction().withName("konocu"))))); + ChaosExperimentStep model = new ChaosExperimentStep().withName("hwankixzbinjepu") + .withBranches(Arrays.asList( + new ChaosExperimentBranch().withName("mryw") + .withActions(Arrays.asList(new ChaosExperimentAction().withName("zoqftiyqzrnkcqvy"), + new ChaosExperimentAction().withName("lwh"))), + new ChaosExperimentBranch().withName("lsicohoqqnwv") + .withActions(Arrays.asList(new ChaosExperimentAction().withName("yav"), + new ChaosExperimentAction().withName("hheunmmqhgyx"), + new ChaosExperimentAction().withName("konocu"), + new ChaosExperimentAction().withName("oklyaxuconuq"))))); model = BinaryData.fromObject(model).toObject(ChaosExperimentStep.class); - Assertions.assertEquals("zoqftiyqzrnkcqvy", model.name()); - Assertions.assertEquals("whzlsicohoq", model.branches().get(0).name()); - Assertions.assertEquals("wvl", model.branches().get(0).actions().get(0).name()); + Assertions.assertEquals("hwankixzbinjepu", model.name()); + Assertions.assertEquals("mryw", model.branches().get(0).name()); + Assertions.assertEquals("zoqftiyqzrnkcqvy", model.branches().get(0).actions().get(0).name()); } } 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 d8afd4f88c5f..2446c73f97c8 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 @@ -16,22 +16,26 @@ public final class ChaosTargetListSelectorTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ChaosTargetListSelector model = BinaryData.fromString( - "{\"type\":\"List\",\"targets\":[{\"type\":\"ChaosTarget\",\"id\":\"i\"},{\"type\":\"ChaosTarget\",\"id\":\"hxepcyvahfnlj\"}],\"id\":\"yq\",\"filter\":{\"type\":\"ChaosTargetFilter\"}}") + "{\"type\":\"List\",\"targets\":[{\"type\":\"ChaosTarget\",\"id\":\"epcyvahfnlj\"},{\"type\":\"ChaosTarget\",\"id\":\"qxj\"},{\"type\":\"ChaosTarget\",\"id\":\"ujqgidok\"},{\"type\":\"ChaosTarget\",\"id\":\"ljyoxgvcltb\"}],\"id\":\"sncghkjeszz\",\"filter\":{\"type\":\"ChaosTargetFilter\"}}") .toObject(ChaosTargetListSelector.class); - Assertions.assertEquals("yq", model.id()); + Assertions.assertEquals("sncghkjeszz", model.id()); Assertions.assertEquals(TargetReferenceType.CHAOS_TARGET, model.targets().get(0).type()); - Assertions.assertEquals("i", model.targets().get(0).id()); + Assertions.assertEquals("epcyvahfnlj", model.targets().get(0).id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ChaosTargetListSelector model = new ChaosTargetListSelector().withId("yq") - .withFilter(new ChaosTargetFilter()) - .withTargets(Arrays.asList(new TargetReference().withType(TargetReferenceType.CHAOS_TARGET).withId("i"), - new TargetReference().withType(TargetReferenceType.CHAOS_TARGET).withId("hxepcyvahfnlj"))); + ChaosTargetListSelector model + = new ChaosTargetListSelector().withId("sncghkjeszz") + .withFilter(new ChaosTargetFilter()) + .withTargets(Arrays.asList( + new TargetReference().withType(TargetReferenceType.CHAOS_TARGET).withId("epcyvahfnlj"), + new TargetReference().withType(TargetReferenceType.CHAOS_TARGET).withId("qxj"), + new TargetReference().withType(TargetReferenceType.CHAOS_TARGET).withId("ujqgidok"), + new TargetReference().withType(TargetReferenceType.CHAOS_TARGET).withId("ljyoxgvcltb"))); model = BinaryData.fromObject(model).toObject(ChaosTargetListSelector.class); - Assertions.assertEquals("yq", model.id()); + Assertions.assertEquals("sncghkjeszz", model.id()); Assertions.assertEquals(TargetReferenceType.CHAOS_TARGET, model.targets().get(0).type()); - Assertions.assertEquals("i", model.targets().get(0).id()); + Assertions.assertEquals("epcyvahfnlj", 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 0ad8c044afe7..987f22e1fa1f 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 @@ -14,22 +14,22 @@ public final class ChaosTargetQuerySelectorTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ChaosTargetQuerySelector model = BinaryData.fromString( - "{\"type\":\"Query\",\"queryString\":\"gvcl\",\"subscriptionIds\":[\"gsncghkjeszz\",\"bijhtxfvgxbf\",\"mxnehmp\",\"ec\"],\"id\":\"godebfqkkrbmpu\",\"filter\":{\"type\":\"ChaosTargetFilter\"}}") + "{\"type\":\"Query\",\"queryString\":\"mpvecxgodebfqk\",\"subscriptionIds\":[\"bmpukgriwflz\",\"fbxzpuzycisp\",\"qzahmgkbrp\"],\"id\":\"y\",\"filter\":{\"type\":\"ChaosTargetFilter\"}}") .toObject(ChaosTargetQuerySelector.class); - Assertions.assertEquals("godebfqkkrbmpu", model.id()); - Assertions.assertEquals("gvcl", model.queryString()); - Assertions.assertEquals("gsncghkjeszz", model.subscriptionIds().get(0)); + Assertions.assertEquals("y", model.id()); + Assertions.assertEquals("mpvecxgodebfqk", model.queryString()); + Assertions.assertEquals("bmpukgriwflz", model.subscriptionIds().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ChaosTargetQuerySelector model = new ChaosTargetQuerySelector().withId("godebfqkkrbmpu") + ChaosTargetQuerySelector model = new ChaosTargetQuerySelector().withId("y") .withFilter(new ChaosTargetFilter()) - .withQueryString("gvcl") - .withSubscriptionIds(Arrays.asList("gsncghkjeszz", "bijhtxfvgxbf", "mxnehmp", "ec")); + .withQueryString("mpvecxgodebfqk") + .withSubscriptionIds(Arrays.asList("bmpukgriwflz", "fbxzpuzycisp", "qzahmgkbrp")); model = BinaryData.fromObject(model).toObject(ChaosTargetQuerySelector.class); - Assertions.assertEquals("godebfqkkrbmpu", model.id()); - Assertions.assertEquals("gvcl", model.queryString()); - Assertions.assertEquals("gsncghkjeszz", model.subscriptionIds().get(0)); + Assertions.assertEquals("y", model.id()); + Assertions.assertEquals("mpvecxgodebfqk", model.queryString()); + Assertions.assertEquals("bmpukgriwflz", 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 b8193a299975..7648419a1b4d 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 @@ -12,17 +12,17 @@ public final class ChaosTargetSelectorTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ChaosTargetSelector model = BinaryData - .fromString( - "{\"type\":\"ChaosTargetSelector\",\"id\":\"fuwutttxf\",\"filter\":{\"type\":\"ChaosTargetFilter\"}}") + ChaosTargetSelector model = BinaryData.fromString( + "{\"type\":\"ChaosTargetSelector\",\"id\":\"wutttxfvjrbi\",\"filter\":{\"type\":\"ChaosTargetFilter\"}}") .toObject(ChaosTargetSelector.class); - Assertions.assertEquals("fuwutttxf", model.id()); + Assertions.assertEquals("wutttxfvjrbi", model.id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ChaosTargetSelector model = new ChaosTargetSelector().withId("fuwutttxf").withFilter(new ChaosTargetFilter()); + ChaosTargetSelector model + = new ChaosTargetSelector().withId("wutttxfvjrbi").withFilter(new ChaosTargetFilter()); model = BinaryData.fromObject(model).toObject(ChaosTargetSelector.class); - Assertions.assertEquals("fuwutttxf", model.id()); + Assertions.assertEquals("wutttxfvjrbi", 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 80e1dbd6a7b5..9c5a9728ae11 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 @@ -13,16 +13,15 @@ public final class ChaosTargetSimpleFilterParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ChaosTargetSimpleFilterParameters model - = BinaryData.fromString("{\"zones\":[\"bnuqqkpik\",\"drgvtqagn\",\"uynhijg\"]}") - .toObject(ChaosTargetSimpleFilterParameters.class); - Assertions.assertEquals("bnuqqkpik", model.zones().get(0)); + = BinaryData.fromString("{\"zones\":[\"rbu\"]}").toObject(ChaosTargetSimpleFilterParameters.class); + Assertions.assertEquals("rbu", model.zones().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ChaosTargetSimpleFilterParameters model - = new ChaosTargetSimpleFilterParameters().withZones(Arrays.asList("bnuqqkpik", "drgvtqagn", "uynhijg")); + = new ChaosTargetSimpleFilterParameters().withZones(Arrays.asList("rbu")); model = BinaryData.fromObject(model).toObject(ChaosTargetSimpleFilterParameters.class); - Assertions.assertEquals("bnuqqkpik", model.zones().get(0)); + Assertions.assertEquals("rbu", 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 318cc3cdc5de..4f1bc5a8e39c 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 @@ -15,16 +15,17 @@ public final class ChaosTargetSimpleFilterTests { public void testDeserialize() throws Exception { ChaosTargetSimpleFilter model = BinaryData .fromString( - "{\"type\":\"Simple\",\"parameters\":{\"zones\":[\"flz\",\"fbxzpuzycisp\",\"qzahmgkbrp\",\"y\"]}}") + "{\"type\":\"Simple\",\"parameters\":{\"zones\":[\"uqqkpik\",\"drgvtqagn\",\"uynhijg\",\"mebf\"]}}") .toObject(ChaosTargetSimpleFilter.class); - Assertions.assertEquals("flz", model.parameters().zones().get(0)); + Assertions.assertEquals("uqqkpik", 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("flz", "fbxzpuzycisp", "qzahmgkbrp", "y"))); + ChaosTargetSimpleFilter model + = new ChaosTargetSimpleFilter().withParameters(new ChaosTargetSimpleFilterParameters() + .withZones(Arrays.asList("uqqkpik", "drgvtqagn", "uynhijg", "mebf"))); model = BinaryData.fromObject(model).toObject(ChaosTargetSimpleFilter.class); - Assertions.assertEquals("flz", model.parameters().zones().get(0)); + Assertions.assertEquals("uqqkpik", model.parameters().zones().get(0)); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ConfigurationFiltersTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ConfigurationFiltersTests.java new file mode 100644 index 000000000000..43a4ef38f704 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ConfigurationFiltersTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.chaos.models.ConfigurationFilters; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ConfigurationFiltersTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ConfigurationFilters model = BinaryData.fromString( + "{\"locations\":[\"aglqivbgkcvkh\",\"zvuqdflvon\",\"yp\"],\"zones\":[\"bcpzgpxtivh\",\"knidib\",\"qjxgpnrhgovfgp\"],\"physicalZones\":[\"mhha\",\"wjrmzvuporqzd\"]}") + .toObject(ConfigurationFilters.class); + Assertions.assertEquals("aglqivbgkcvkh", model.locations().get(0)); + Assertions.assertEquals("bcpzgpxtivh", model.zones().get(0)); + Assertions.assertEquals("mhha", model.physicalZones().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ConfigurationFilters model + = new ConfigurationFilters().withLocations(Arrays.asList("aglqivbgkcvkh", "zvuqdflvon", "yp")) + .withZones(Arrays.asList("bcpzgpxtivh", "knidib", "qjxgpnrhgovfgp")) + .withPhysicalZones(Arrays.asList("mhha", "wjrmzvuporqzd")); + model = BinaryData.fromObject(model).toObject(ConfigurationFilters.class); + Assertions.assertEquals("aglqivbgkcvkh", model.locations().get(0)); + Assertions.assertEquals("bcpzgpxtivh", model.zones().get(0)); + Assertions.assertEquals("mhha", model.physicalZones().get(0)); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CustomerDataStoragePropertiesTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CustomerDataStoragePropertiesTests.java new file mode 100644 index 000000000000..0d02725ccdc1 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CustomerDataStoragePropertiesTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.chaos.models.CustomerDataStorageProperties; +import org.junit.jupiter.api.Assertions; + +public final class CustomerDataStoragePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CustomerDataStorageProperties model = BinaryData + .fromString("{\"storageAccountResourceId\":\"cvpnazzmhjrunmpx\",\"blobContainerName\":\"dbhrbnlankxm\"}") + .toObject(CustomerDataStorageProperties.class); + Assertions.assertEquals("cvpnazzmhjrunmpx", model.storageAccountResourceId()); + Assertions.assertEquals("dbhrbnlankxm", model.blobContainerName()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + CustomerDataStorageProperties model + = new CustomerDataStorageProperties().withStorageAccountResourceId("cvpnazzmhjrunmpx") + .withBlobContainerName("dbhrbnlankxm"); + model = BinaryData.fromObject(model).toObject(CustomerDataStorageProperties.class); + Assertions.assertEquals("cvpnazzmhjrunmpx", model.storageAccountResourceId()); + Assertions.assertEquals("dbhrbnlankxm", model.blobContainerName()); + } +} 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 a60c7353005f..2ce1a2756767 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 @@ -13,17 +13,17 @@ public final class DelayActionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DelayAction model - = BinaryData.fromString("{\"type\":\"delay\",\"duration\":\"PT101H1M22S\",\"name\":\"vfcivfsnkymuc\"}") + = BinaryData.fromString("{\"type\":\"delay\",\"duration\":\"PT6H5M50S\",\"name\":\"kymuctqhjfbebr\"}") .toObject(DelayAction.class); - Assertions.assertEquals("vfcivfsnkymuc", model.name()); - Assertions.assertEquals(Duration.parse("PT101H1M22S"), model.duration()); + Assertions.assertEquals("kymuctqhjfbebr", model.name()); + Assertions.assertEquals(Duration.parse("PT6H5M50S"), model.duration()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - DelayAction model = new DelayAction().withName("vfcivfsnkymuc").withDuration(Duration.parse("PT101H1M22S")); + DelayAction model = new DelayAction().withName("kymuctqhjfbebr").withDuration(Duration.parse("PT6H5M50S")); model = BinaryData.fromObject(model).toObject(DelayAction.class); - Assertions.assertEquals("vfcivfsnkymuc", model.name()); - Assertions.assertEquals(Duration.parse("PT101H1M22S"), model.duration()); + Assertions.assertEquals("kymuctqhjfbebr", model.name()); + Assertions.assertEquals(Duration.parse("PT6H5M50S"), model.duration()); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/DiscoveredResourceInnerTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/DiscoveredResourceInnerTests.java new file mode 100644 index 000000000000..42260af1848c --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/DiscoveredResourceInnerTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.chaos.fluent.models.DiscoveredResourceInner; + +public final class DiscoveredResourceInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DiscoveredResourceInner model = BinaryData.fromString( + "{\"properties\":{\"namespace\":\"jh\",\"resourceName\":\"mgixhcmavmqfou\",\"resourceType\":\"or\",\"fullyQualifiedIdentifier\":\"cgyypro\",\"discoveredAt\":\"2021-06-17T04:22:53Z\",\"scope\":\"ypundmbxhugc\"},\"id\":\"k\",\"name\":\"vlgo\",\"type\":\"bmftpmdt\"}") + .toObject(DiscoveredResourceInner.class); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/DiscoveredResourceListResultTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/DiscoveredResourceListResultTests.java new file mode 100644 index 000000000000..b3522d6344a1 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/DiscoveredResourceListResultTests.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.chaos.implementation.models.DiscoveredResourceListResult; +import org.junit.jupiter.api.Assertions; + +public final class DiscoveredResourceListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DiscoveredResourceListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"namespace\":\"cw\",\"resourceName\":\"hohsd\",\"resourceType\":\"mcdzsufcohdxbz\",\"fullyQualifiedIdentifier\":\"mcmuapc\",\"discoveredAt\":\"2021-08-04T10:09:35Z\",\"scope\":\"dbevwqqxeysko\"},\"id\":\"zinkfkbgbzbowxeq\",\"name\":\"clj\",\"type\":\"ygvkzqkjj\"},{\"properties\":{\"namespace\":\"kbzefezrxcczurt\",\"resourceName\":\"e\",\"resourceType\":\"pqxbkwvzgnzvdf\",\"fullyQualifiedIdentifier\":\"zdix\",\"discoveredAt\":\"2021-06-11T17:56:37Z\",\"scope\":\"q\"},\"id\":\"odawopqhewjptmcg\",\"name\":\"bostzel\",\"type\":\"dlat\"},{\"properties\":{\"namespace\":\"mzlbiojlvfhrb\",\"resourceName\":\"pn\",\"resourceType\":\"qvcww\",\"fullyQualifiedIdentifier\":\"yurmochpprprs\",\"discoveredAt\":\"2021-04-15T20:59:55Z\",\"scope\":\"okayzejnhlbkp\"},\"id\":\"pcpil\",\"name\":\"hahzvechndbnwi\",\"type\":\"hol\"},{\"properties\":{\"namespace\":\"jwiuubwefqsfapaq\",\"resourceName\":\"ferr\",\"resourceType\":\"wexjkmfxapjwogq\",\"fullyQualifiedIdentifier\":\"nobpudcdabtqwpw\",\"discoveredAt\":\"2021-08-19T12:15:22Z\",\"scope\":\"wbzasqbuclj\"},\"id\":\"yexaoguy\",\"name\":\"i\",\"type\":\"ids\"}],\"nextLink\":\"ultxijjumfq\"}") + .toObject(DiscoveredResourceListResult.class); + Assertions.assertEquals("ultxijjumfq", model.nextLink()); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/DiscoveredResourcePropertiesTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/DiscoveredResourcePropertiesTests.java new file mode 100644 index 000000000000..2240a275d19b --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/DiscoveredResourcePropertiesTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.chaos.models.DiscoveredResourceProperties; + +public final class DiscoveredResourcePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DiscoveredResourceProperties model = BinaryData.fromString( + "{\"namespace\":\"fjltfvnzcyjtotp\",\"resourceName\":\"opv\",\"resourceType\":\"bdb\",\"fullyQualifiedIdentifier\":\"qgqqihedsvqwthmk\",\"discoveredAt\":\"2021-06-02T15:24:18Z\",\"scope\":\"bcysih\"}") + .toObject(DiscoveredResourceProperties.class); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/DiscoveredResourcesGetWithResponseMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/DiscoveredResourcesGetWithResponseMockTests.java new file mode 100644 index 000000000000..b9c4410a19ed --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/DiscoveredResourcesGetWithResponseMockTests.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.chaos.ChaosManager; +import com.azure.resourcemanager.chaos.models.DiscoveredResource; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class DiscoveredResourcesGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"namespace\":\"qey\",\"resourceName\":\"gltygxhqfgq\",\"resourceType\":\"ayejsxtlgflwfgz\",\"fullyQualifiedIdentifier\":\"iucijjcea\",\"discoveredAt\":\"2021-05-19T19:26:59Z\",\"scope\":\"ijjj\"},\"id\":\"va\",\"name\":\"caszk\",\"type\":\"xk\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ChaosManager manager = ChaosManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + DiscoveredResource response = manager.discoveredResources() + .getWithResponse("yngydgrpxncaki", "aondjrkclamgg", "vlmfej", com.azure.core.util.Context.NONE) + .getValue(); + + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/DiscoveredResourcesListByWorkspaceMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/DiscoveredResourcesListByWorkspaceMockTests.java new file mode 100644 index 000000000000..d3f2fe8dd175 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/DiscoveredResourcesListByWorkspaceMockTests.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.chaos.ChaosManager; +import com.azure.resourcemanager.chaos.models.DiscoveredResource; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class DiscoveredResourcesListByWorkspaceMockTests { + @Test + public void testListByWorkspace() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"namespace\":\"gqogjwpindedva\",\"resourceName\":\"bxbhmedeilbj\",\"resourceType\":\"wfcfxzirzz\",\"fullyQualifiedIdentifier\":\"hvwyp\",\"discoveredAt\":\"2021-10-10T22:00:34Z\",\"scope\":\"u\"},\"id\":\"slczwciidjsllf\",\"name\":\"yvdmvx\",\"type\":\"dqacfrgnawbabgf\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ChaosManager manager = ChaosManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response + = manager.discoveredResources().listByWorkspace("ccxetyvkun", "ignohi", com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/EntraIdentityTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/EntraIdentityTests.java new file mode 100644 index 000000000000..3f179c6b4579 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/EntraIdentityTests.java @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.chaos.models.EntraIdentity; + +public final class EntraIdentityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + EntraIdentity model + = BinaryData.fromString("{\"objectId\":\"ky\",\"tenantId\":\"cxcjxgry\"}").toObject(EntraIdentity.class); + } +} 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 18dc5e0dcefe..d1503f06bd83 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 @@ -11,7 +11,7 @@ public final class ExperimentExecutionDetailsInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExperimentExecutionDetailsInner model = BinaryData.fromString( - "{\"type\":\"olbgycduiertgccy\",\"id\":\"aolps\",\"name\":\"qlfmmdnbb\",\"properties\":{\"status\":\"pswiydmcwyh\",\"startedAt\":\"2021-07-04T08:35:19Z\",\"stoppedAt\":\"2021-04-11T02:49Z\",\"failureReason\":\"dbzm\",\"lastActionAt\":\"2021-10-14T05:29:13Z\",\"runInformation\":{\"steps\":[{\"stepName\":\"daodvxzbncblyl\",\"stepId\":\"tdbhhxsrzdzu\",\"status\":\"rsc\",\"branches\":[{}]}]}}}") + "{\"type\":\"wjmy\",\"id\":\"dsslswt\",\"name\":\"eriofzpyqs\",\"properties\":{\"status\":\"abnetshh\",\"startedAt\":\"2021-03-13T20:20:01Z\",\"stoppedAt\":\"2021-04-16T09:40:18Z\",\"provisioningState\":\"Failed\",\"failureReason\":\"wiwubm\",\"lastActionAt\":\"2021-05-28T18:40:12Z\",\"runInformation\":{\"steps\":[{\"stepName\":\"nkww\",\"stepId\":\"pjflcxogao\",\"status\":\"nzmnsikvm\",\"branches\":[{}]},{\"stepName\":\"qqkdltfzxmhhvhgu\",\"stepId\":\"odkwobd\",\"status\":\"xtibqdxbxwakbog\",\"branches\":[{},{},{}]},{\"stepName\":\"lkzgxhuriplbp\",\"stepId\":\"xunkbebxmubyynt\",\"status\":\"rbqtkoie\",\"branches\":[{}]}]}}}") .toObject(ExperimentExecutionDetailsInner.class); } } 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 de951d638685..9ca088f1ac5c 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 @@ -11,7 +11,7 @@ public final class ExperimentExecutionDetailsPropertiesRunInformationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExperimentExecutionDetailsPropertiesRunInformation model = BinaryData.fromString( - "{\"steps\":[{\"stepName\":\"um\",\"stepId\":\"p\",\"status\":\"ebmnzbtbhjpglk\",\"branches\":[{\"branchName\":\"dneu\",\"branchId\":\"fphsdyhtozfikdow\",\"status\":\"uuvxz\",\"actions\":[{},{},{},{}]},{\"branchName\":\"ithhqzon\",\"branchId\":\"ggbhcohfwds\",\"status\":\"ka\",\"actions\":[{},{},{}]}]}]}") + "{\"steps\":[{\"stepName\":\"szdtmhrkwof\",\"stepId\":\"voqacpiexpbt\",\"status\":\"wbwo\",\"branches\":[{\"branchName\":\"shrtdtkcnqxwb\",\"branchId\":\"kulpiujwaasi\",\"status\":\"i\",\"actions\":[{},{},{}]},{\"branchName\":\"uqerpqlpqwc\",\"branchId\":\"uqgbdbutauvfbt\",\"status\":\"whhmhykojo\",\"actions\":[{},{}]}]},{\"stepName\":\"nd\",\"stepId\":\"ichkoymkcdyhb\",\"status\":\"kpw\",\"branches\":[{\"branchName\":\"novvqfovljxy\",\"branchId\":\"uwsyrsndsytgadg\",\"status\":\"aeaeneqnzarrw\",\"actions\":[{}]},{\"branchName\":\"ijfqkacewiipfp\",\"branchId\":\"ji\",\"status\":\"wifto\",\"actions\":[{},{},{},{}]},{\"branchName\":\"puvks\",\"branchId\":\"lsa\",\"status\":\"ynfs\",\"actions\":[{},{},{}]}]},{\"stepName\":\"ph\",\"stepId\":\"pxodlqiyntorzih\",\"status\":\"osjswsr\",\"branches\":[{\"branchName\":\"zrpzb\",\"branchId\":\"ckqqzqioxiysui\",\"status\":\"ynkedyatrwyhqmib\",\"actions\":[{}]},{\"branchName\":\"itsmypyyn\",\"branchId\":\"dpumnzgmw\",\"status\":\"mabiknsorgjhxb\",\"actions\":[{},{}]},{\"branchName\":\"wwrlkdmtncv\",\"branchId\":\"otllxdyhgsyo\",\"status\":\"gjltdtbnnhado\",\"actions\":[{},{},{}]},{\"branchName\":\"vcikhnvpamqgx\",\"branchId\":\"u\",\"status\":\"ik\",\"actions\":[{},{},{},{}]}]},{\"stepName\":\"xkalla\",\"stepId\":\"elwuipi\",\"status\":\"jzkzi\",\"branches\":[{\"branchName\":\"c\",\"branchId\":\"y\",\"status\":\"yrnxxmueedn\",\"actions\":[{},{}]},{\"branchName\":\"stkwqqtch\",\"branchId\":\"lmfmtdaay\",\"status\":\"v\",\"actions\":[{},{},{},{}]}]}]}") .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 432d0451bbc3..fa7a1da7900d 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 @@ -11,7 +11,7 @@ public final class ExperimentExecutionDetailsPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExperimentExecutionDetailsProperties model = BinaryData.fromString( - "{\"status\":\"evfiwjmygt\",\"startedAt\":\"2021-07-01T16:24:58Z\",\"stoppedAt\":\"2021-11-02T04:29:59Z\",\"failureReason\":\"tmweriofzpyq\",\"lastActionAt\":\"2021-06-06T05:20:48Z\",\"runInformation\":{\"steps\":[{\"stepName\":\"tshhszhedp\",\"stepId\":\"wiwubm\",\"status\":\"besldnkwwtppjflc\",\"branches\":[{\"branchName\":\"okonzmnsikvmkqz\",\"branchId\":\"qkdltfz\",\"status\":\"hhvh\",\"actions\":[{}]},{\"branchName\":\"odkwobd\",\"branchId\":\"xtibqdxbxwakbog\",\"status\":\"ndlkzgxhurip\",\"actions\":[{},{}]},{\"branchName\":\"dxunkbebxmubyyn\",\"branchId\":\"lrb\",\"status\":\"koievseo\",\"actions\":[{}]},{\"branchName\":\"l\",\"branchId\":\"muwlauwzizxbm\",\"status\":\"cjefuzmu\",\"actions\":[{},{},{}]}]}]}}") + "{\"status\":\"tgqr\",\"startedAt\":\"2021-06-26T20:58:29Z\",\"stoppedAt\":\"2021-07-23T15:24:06Z\",\"provisioningState\":\"Succeeded\",\"failureReason\":\"uwz\",\"lastActionAt\":\"2021-10-11T08:08:51Z\",\"runInformation\":{\"steps\":[{\"stepName\":\"cjefuzmu\",\"stepId\":\"bttdumorppxe\",\"status\":\"nzbtbhj\",\"branches\":[{\"branchName\":\"fgohdneuelfphs\",\"branchId\":\"htozfikdow\",\"status\":\"uuvxz\",\"actions\":[{},{},{},{}]}]},{\"stepName\":\"ithhqzon\",\"stepId\":\"ggbhcohfwds\",\"status\":\"ka\",\"branches\":[{\"branchName\":\"iiswacffgdkzze\",\"branchId\":\"fvhqc\",\"status\":\"ilvpnppfuflrwd\",\"actions\":[{},{}]},{\"branchName\":\"xyjrxsagafcnih\",\"branchId\":\"qapnedgfbcv\",\"status\":\"vq\",\"actions\":[{},{},{},{}]},{\"branchName\":\"qdcvdrhvoo\",\"branchId\":\"otbobzdopcj\",\"status\":\"nhdldwmgxcx\",\"actions\":[{},{},{},{}]}]},{\"stepName\":\"mutwuoe\",\"stepId\":\"pkhjwni\",\"status\":\"sluicpdggkzz\",\"branches\":[{\"branchName\":\"mpaxmodfvuefywsb\",\"branchId\":\"vmwy\",\"status\":\"fouyf\",\"actions\":[{}]},{\"branchName\":\"cpwi\",\"branchId\":\"vqtmnub\",\"status\":\"kpzksmondjmq\",\"actions\":[{},{},{},{}]},{\"branchName\":\"pomgkopkwhojvp\",\"branchId\":\"qgxy\",\"status\":\"ocmbqfqvmkcxoza\",\"actions\":[{},{},{}]},{\"branchName\":\"lxprglyatddckcbc\",\"branchId\":\"jrjxgciqibrhosx\",\"status\":\"qrhzoymibmrqyib\",\"actions\":[{},{}]}]}]}}") .toObject(ExperimentExecutionDetailsProperties.class); } } 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 93eaa576b5ae..8191eaf902c2 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 @@ -11,7 +11,7 @@ public final class ExperimentExecutionInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExperimentExecutionInner model = BinaryData.fromString( - "{\"properties\":{\"status\":\"pybsrfbjfdtw\",\"startedAt\":\"2021-01-25T00:48:06Z\",\"stoppedAt\":\"2021-06-01T18:34:35Z\"},\"id\":\"pvjzbe\",\"name\":\"ilzznfqqnvwp\",\"type\":\"qtaruoujmkcjhwq\"}") + "{\"properties\":{\"status\":\"ewwwfbkrvrnsv\",\"startedAt\":\"2021-04-19T21:02:09Z\",\"stoppedAt\":\"2021-02-05T19:22:33Z\",\"provisioningState\":\"Running\"},\"id\":\"rsbfovasrruvw\",\"name\":\"hsqfsubcgjbirxbp\",\"type\":\"bsrfbj\"}") .toObject(ExperimentExecutionInner.class); } } 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 08559925483b..0dbb764b3721 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 @@ -12,8 +12,8 @@ public final class ExperimentExecutionListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExperimentExecutionListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"status\":\"hin\",\"startedAt\":\"2021-07-07T21:20Z\",\"stoppedAt\":\"2021-07-26T04:46:18Z\"},\"id\":\"fthnzdn\",\"name\":\"sl\",\"type\":\"nayqi\"}],\"nextLink\":\"nduhavhqlkthum\"}") + "{\"value\":[{\"properties\":{\"status\":\"xilzznf\",\"startedAt\":\"2021-04-18T09:57:36Z\",\"stoppedAt\":\"2021-08-05T13:05:43Z\",\"provisioningState\":\"Canceled\"},\"id\":\"taruoujmkcj\",\"name\":\"wqytjrybnwjewgdr\",\"type\":\"ervnaenqpehi\"},{\"properties\":{\"status\":\"ygmi\",\"startedAt\":\"2021-05-30T21:32:13Z\",\"stoppedAt\":\"2021-09-13T22:02:43Z\",\"provisioningState\":\"Canceled\"},\"id\":\"sl\",\"name\":\"nayqi\",\"type\":\"ynduha\"},{\"properties\":{\"status\":\"lkthu\",\"startedAt\":\"2021-10-13T06:47:40Z\",\"stoppedAt\":\"2021-06-27T19:43:46Z\",\"provisioningState\":\"Failed\"},\"id\":\"cdui\",\"name\":\"r\",\"type\":\"gccymvaolpssl\"},{\"properties\":{\"status\":\"mmdnbbglzps\",\"startedAt\":\"2021-11-30T08:30:44Z\",\"stoppedAt\":\"2021-07-04T16:25:15Z\",\"provisioningState\":\"Updating\"},\"id\":\"hzdxssadbzm\",\"name\":\"vdfznudaodvxzb\",\"type\":\"cblylpstdbhhxsr\"}],\"nextLink\":\"zucerscdntnev\"}") .toObject(ExperimentExecutionListResult.class); - Assertions.assertEquals("nduhavhqlkthum", model.nextLink()); + Assertions.assertEquals("zucerscdntnev", model.nextLink()); } } 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 09cb5d3f2d15..c5e25513036c 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 @@ -11,7 +11,7 @@ public final class ExperimentExecutionPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExperimentExecutionProperties model = BinaryData.fromString( - "{\"status\":\"jrybnwjewgdrjer\",\"startedAt\":\"2021-10-08T09:31:49Z\",\"stoppedAt\":\"2021-09-08T11:50:32Z\"}") + "{\"status\":\"twss\",\"startedAt\":\"2021-06-01T18:34:35Z\",\"stoppedAt\":\"2021-03-22T01:55:17Z\",\"provisioningState\":\"Succeeded\"}") .toObject(ExperimentExecutionProperties.class); } } 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 6b7937b2ed83..8b6d12b91db9 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 @@ -11,6 +11,7 @@ import com.azure.resourcemanager.chaos.models.ChaosExperimentStep; import com.azure.resourcemanager.chaos.models.ChaosTargetFilter; import com.azure.resourcemanager.chaos.models.ChaosTargetSelector; +import com.azure.resourcemanager.chaos.models.CustomerDataStorageProperties; import com.azure.resourcemanager.chaos.models.ManagedServiceIdentityType; import com.azure.resourcemanager.chaos.models.ResourceIdentity; import com.azure.resourcemanager.chaos.models.UserAssignedIdentity; @@ -23,77 +24,87 @@ public final class ExperimentInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExperimentInner model = BinaryData.fromString( - "{\"identity\":{\"principalId\":\"vddntwn\",\"tenantId\":\"icbtwnpzao\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"ciwqvhk\":{\"principalId\":\"hcffcyddglmjthjq\",\"clientId\":\"pyeicxm\"},\"w\":{\"principalId\":\"xuigdtopbobj\",\"clientId\":\"hm\"},\"iotkftutqxl\":{\"principalId\":\"m\",\"clientId\":\"hrzayvvtpgvdf\"},\"tthzrvqd\":{\"principalId\":\"xlefgugnxkrx\",\"clientId\":\"mi\"}}},\"properties\":{\"provisioningState\":\"Canceled\",\"steps\":[{\"name\":\"jybige\",\"branches\":[{\"name\":\"qfbow\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"anyktzlcuiywg\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"ywgndrv\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"nhzgpphrcgyn\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"ocpecfvmmco\"}]},{\"name\":\"fsxlzevgbmqjqa\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"y\"}]},{\"name\":\"mivkwlzuvcc\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"nfnbacfionlebxe\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"qgtz\"}]}]},{\"name\":\"dpnqbq\",\"branches\":[{\"name\":\"xrjfeallnwsub\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"njampm\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"gnzscxaqwo\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"chcbonqvpkvlrxnj\"}]},{\"name\":\"ase\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"heoflokeyyienjbd\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"wtgrhpdjpj\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"masxazjpqyegu\"}]},{\"name\":\"lhbxxhejjzzvdud\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"dslfhotwmcy\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"pwlbjnpg\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"cftadeh\"}]},{\"name\":\"nltyfsoppusuesnz\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"ej\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"avo\"}]}]},{\"name\":\"xzdmohctb\",\"branches\":[{\"name\":\"udwxdndnvowguj\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"gwdkcglhsl\"}]},{\"name\":\"zj\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"ggd\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"jixhbk\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"ofqweykhmenevfye\"}]}]},{\"name\":\"fwhybcibvy\",\"branches\":[{\"name\":\"c\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"tynnaamdectehfi\"}]}]}],\"selectors\":[{\"type\":\"ChaosTargetSelector\",\"id\":\"cj\",\"filter\":{\"type\":\"ChaosTargetFilter\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"pvhez\",\"filter\":{\"type\":\"ChaosTargetFilter\"}}]},\"location\":\"q\",\"tags\":{\"qjpkcattpngjcrc\":\"refovgmkqsleyyvx\",\"ounqecano\":\"zsqpjhvmdajvny\",\"pjmcmatuokthfuiu\":\"eupfhyhltrpm\",\"zydagfuaxbezyiuo\":\"odsfcpkvxodpuozm\"},\"id\":\"ktwh\",\"name\":\"dxwzywqsmbsurexi\",\"type\":\"o\"}") + "{\"identity\":{\"principalId\":\"qmi\",\"tenantId\":\"thz\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"qfbow\":{\"principalId\":\"abhjybi\",\"clientId\":\"h\"},\"rcgyn\":{\"principalId\":\"anyktzlcuiywg\",\"clientId\":\"wgndrvynhzgpp\"},\"qjqabcypmivkwl\":{\"principalId\":\"cpecfvmmcoofs\",\"clientId\":\"zevgb\"}}},\"properties\":{\"provisioningState\":\"Deleting\",\"steps\":[{\"name\":\"c\",\"branches\":[{\"name\":\"nfnbacfionlebxe\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"gtzxdpn\"}]},{\"name\":\"bqqwxrj\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"al\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"nwsubisnj\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"mpmngnzscxaqwoo\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"hcbonqvpkvlr\"}]}]},{\"name\":\"njeaseipheofloke\",\"branches\":[{\"name\":\"ienjbdlwtgr\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"djpjumasxazjpq\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"e\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"ualhbxxhejj\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"zvdudgwdslfhotwm\"}]}]},{\"name\":\"ynpwlbj\",\"branches\":[{\"name\":\"gacftadeh\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"ltyfsop\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"usue\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"nzwdejba\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"orxzdmohctbqvud\"}]},{\"name\":\"xdn\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"vo\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"gujjugwdkcglh\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"lazjdyggdtjixhbk\"}]},{\"name\":\"ofqweykhmenevfye\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"whybcib\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"yvdcsitynnaa\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"dectehfiqsc\"}]},{\"name\":\"eypvhezrkg\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"c\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"refovgmkqsleyyvx\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"qjpkcattpngjcrc\"}]}]},{\"name\":\"zsqpjhvmdajvny\",\"branches\":[{\"name\":\"unqecanoae\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"fhyhltrpmopjmcma\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"u\"}]},{\"name\":\"kthfui\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"odsfcpkvxodpuozm\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"zydagfuaxbezyiuo\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"ktwh\"}]},{\"name\":\"dxwzywqsmbsurexi\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"ryocfsfksymdd\"}]}]}],\"selectors\":[{\"type\":\"ChaosTargetSelector\",\"id\":\"tki\",\"filter\":{\"type\":\"ChaosTargetFilter\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"xhqyudxorrqnb\",\"filter\":{\"type\":\"ChaosTargetFilter\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"czvyifq\",\"filter\":{\"type\":\"ChaosTargetFilter\"}}],\"customerDataStorage\":{\"storageAccountResourceId\":\"vjsllrmvvdfw\",\"blobContainerName\":\"kpnpulexxbczwtr\"}},\"location\":\"iqzbq\",\"tags\":{\"okacspk\":\"ovm\",\"jmflbvvnch\":\"lhzdobp\",\"ajiwkuo\":\"kcciwwzjuqkhr\",\"sauuimj\":\"oskg\"},\"id\":\"vxieduugidyj\",\"name\":\"rfbyaosvexcso\",\"type\":\"pclhocohslk\"}") .toObject(ExperimentInner.class); - Assertions.assertEquals("q", model.location()); - Assertions.assertEquals("refovgmkqsleyyvx", model.tags().get("qjpkcattpngjcrc")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("jybige", model.steps().get(0).name()); - Assertions.assertEquals("qfbow", model.steps().get(0).branches().get(0).name()); - Assertions.assertEquals("anyktzlcuiywg", model.steps().get(0).branches().get(0).actions().get(0).name()); - Assertions.assertEquals("cj", model.selectors().get(0).id()); + Assertions.assertEquals("iqzbq", model.location()); + Assertions.assertEquals("ovm", model.tags().get("okacspk")); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); + Assertions.assertEquals("c", model.steps().get(0).name()); + Assertions.assertEquals("nfnbacfionlebxe", model.steps().get(0).branches().get(0).name()); + Assertions.assertEquals("gtzxdpn", model.steps().get(0).branches().get(0).actions().get(0).name()); + Assertions.assertEquals("tki", model.selectors().get(0).id()); + Assertions.assertEquals("vjsllrmvvdfw", model.customerDataStorage().storageAccountResourceId()); + Assertions.assertEquals("kpnpulexxbczwtr", model.customerDataStorage().blobContainerName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ExperimentInner model = new ExperimentInner().withLocation("q") - .withTags(mapOf("qjpkcattpngjcrc", "refovgmkqsleyyvx", "ounqecano", "zsqpjhvmdajvny", "pjmcmatuokthfuiu", - "eupfhyhltrpm", "zydagfuaxbezyiuo", "odsfcpkvxodpuozm")) - .withIdentity(new ResourceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities( - mapOf("ciwqvhk", new UserAssignedIdentity(), "w", new UserAssignedIdentity(), "iotkftutqxl", - new UserAssignedIdentity(), "tthzrvqd", new UserAssignedIdentity()))) + ExperimentInner model = new ExperimentInner().withLocation("iqzbq") + .withTags(mapOf("okacspk", "ovm", "jmflbvvnch", "lhzdobp", "ajiwkuo", "kcciwwzjuqkhr", "sauuimj", "oskg")) + .withIdentity(new ResourceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) + .withUserAssignedIdentities(mapOf("qfbow", new UserAssignedIdentity(), "rcgyn", + new UserAssignedIdentity(), "qjqabcypmivkwl", new UserAssignedIdentity()))) .withSteps(Arrays.asList( - new ChaosExperimentStep().withName("jybige") + new ChaosExperimentStep().withName("c") .withBranches(Arrays.asList( - new ChaosExperimentBranch().withName("qfbow") - .withActions(Arrays.asList(new ChaosExperimentAction().withName("anyktzlcuiywg"), - new ChaosExperimentAction().withName("ywgndrv"), - new ChaosExperimentAction().withName("nhzgpphrcgyn"), - new ChaosExperimentAction().withName("ocpecfvmmco"))), - new ChaosExperimentBranch().withName("fsxlzevgbmqjqa") - .withActions(Arrays.asList(new ChaosExperimentAction().withName("y"))), - new ChaosExperimentBranch().withName("mivkwlzuvcc") - .withActions(Arrays.asList(new ChaosExperimentAction().withName("nfnbacfionlebxe"), - new ChaosExperimentAction().withName("qgtz"))))), - new ChaosExperimentStep().withName("dpnqbq") + new ChaosExperimentBranch().withName("nfnbacfionlebxe") + .withActions(Arrays.asList(new ChaosExperimentAction().withName("gtzxdpn"))), + new ChaosExperimentBranch().withName("bqqwxrj") + .withActions(Arrays.asList(new ChaosExperimentAction().withName("al"), + new ChaosExperimentAction().withName("nwsubisnj"), + new ChaosExperimentAction().withName("mpmngnzscxaqwoo"), + new ChaosExperimentAction().withName("hcbonqvpkvlr"))))), + new ChaosExperimentStep().withName("njeaseipheofloke") + .withBranches(Arrays.asList(new ChaosExperimentBranch().withName("ienjbdlwtgr") + .withActions(Arrays.asList(new ChaosExperimentAction().withName("djpjumasxazjpq"), + new ChaosExperimentAction().withName("e"), + new ChaosExperimentAction().withName("ualhbxxhejj"), + new ChaosExperimentAction().withName("zvdudgwdslfhotwm"))))), + new ChaosExperimentStep().withName("ynpwlbj") .withBranches(Arrays.asList( - new ChaosExperimentBranch().withName("xrjfeallnwsub") - .withActions(Arrays.asList(new ChaosExperimentAction().withName("njampm"), - new ChaosExperimentAction().withName("gnzscxaqwo"), - new ChaosExperimentAction().withName("chcbonqvpkvlrxnj"))), - new ChaosExperimentBranch().withName("ase") - .withActions(Arrays.asList(new ChaosExperimentAction().withName("heoflokeyyienjbd"), - new ChaosExperimentAction().withName("wtgrhpdjpj"), - new ChaosExperimentAction().withName("masxazjpqyegu"))), - new ChaosExperimentBranch().withName("lhbxxhejjzzvdud") - .withActions(Arrays.asList(new ChaosExperimentAction().withName("dslfhotwmcy"), - new ChaosExperimentAction().withName("pwlbjnpg"), - new ChaosExperimentAction().withName("cftadeh"))), - new ChaosExperimentBranch().withName("nltyfsoppusuesnz") - .withActions(Arrays.asList(new ChaosExperimentAction().withName("ej"), - new ChaosExperimentAction().withName("avo"))))), - new ChaosExperimentStep().withName("xzdmohctb") + new ChaosExperimentBranch().withName("gacftadeh") + .withActions(Arrays.asList(new ChaosExperimentAction().withName("ltyfsop"), + new ChaosExperimentAction().withName("usue"), + new ChaosExperimentAction().withName("nzwdejba"), + new ChaosExperimentAction().withName("orxzdmohctbqvud"))), + new ChaosExperimentBranch().withName("xdn") + .withActions(Arrays.asList(new ChaosExperimentAction().withName("vo"), + new ChaosExperimentAction().withName("gujjugwdkcglh"), + new ChaosExperimentAction().withName("lazjdyggdtjixhbk"))), + new ChaosExperimentBranch().withName("ofqweykhmenevfye") + .withActions(Arrays.asList(new ChaosExperimentAction().withName("whybcib"), + new ChaosExperimentAction().withName("yvdcsitynnaa"), + new ChaosExperimentAction().withName("dectehfiqsc"))), + new ChaosExperimentBranch().withName("eypvhezrkg") + .withActions(Arrays.asList(new ChaosExperimentAction().withName("c"), + new ChaosExperimentAction().withName("refovgmkqsleyyvx"), + new ChaosExperimentAction().withName("qjpkcattpngjcrc"))))), + new ChaosExperimentStep().withName("zsqpjhvmdajvny") .withBranches(Arrays.asList( - new ChaosExperimentBranch().withName("udwxdndnvowguj") - .withActions(Arrays.asList(new ChaosExperimentAction().withName("gwdkcglhsl"))), - new ChaosExperimentBranch().withName("zj") - .withActions(Arrays.asList(new ChaosExperimentAction().withName("ggd"), - new ChaosExperimentAction().withName("jixhbk"), - new ChaosExperimentAction().withName("ofqweykhmenevfye"))))), - new ChaosExperimentStep().withName("fwhybcibvy") - .withBranches(Arrays.asList(new ChaosExperimentBranch().withName("c") - .withActions(Arrays.asList(new ChaosExperimentAction().withName("tynnaamdectehfi"))))))) - .withSelectors(Arrays.asList(new ChaosTargetSelector().withId("cj").withFilter(new ChaosTargetFilter()), - new ChaosTargetSelector().withId("pvhez").withFilter(new ChaosTargetFilter()))); + new ChaosExperimentBranch().withName("unqecanoae") + .withActions(Arrays.asList(new ChaosExperimentAction().withName("fhyhltrpmopjmcma"), + new ChaosExperimentAction().withName("u"))), + new ChaosExperimentBranch().withName("kthfui") + .withActions(Arrays.asList(new ChaosExperimentAction().withName("odsfcpkvxodpuozm"), + new ChaosExperimentAction().withName("zydagfuaxbezyiuo"), + new ChaosExperimentAction().withName("ktwh"))), + new ChaosExperimentBranch().withName("dxwzywqsmbsurexi") + .withActions(Arrays.asList(new ChaosExperimentAction().withName("ryocfsfksymdd"))))))) + .withSelectors(Arrays.asList(new ChaosTargetSelector().withId("tki").withFilter(new ChaosTargetFilter()), + new ChaosTargetSelector().withId("xhqyudxorrqnb").withFilter(new ChaosTargetFilter()), + new ChaosTargetSelector().withId("czvyifq").withFilter(new ChaosTargetFilter()))) + .withCustomerDataStorage(new CustomerDataStorageProperties().withStorageAccountResourceId("vjsllrmvvdfw") + .withBlobContainerName("kpnpulexxbczwtr")); model = BinaryData.fromObject(model).toObject(ExperimentInner.class); - Assertions.assertEquals("q", model.location()); - Assertions.assertEquals("refovgmkqsleyyvx", model.tags().get("qjpkcattpngjcrc")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("jybige", model.steps().get(0).name()); - Assertions.assertEquals("qfbow", model.steps().get(0).branches().get(0).name()); - Assertions.assertEquals("anyktzlcuiywg", model.steps().get(0).branches().get(0).actions().get(0).name()); - Assertions.assertEquals("cj", model.selectors().get(0).id()); + Assertions.assertEquals("iqzbq", model.location()); + Assertions.assertEquals("ovm", model.tags().get("okacspk")); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); + Assertions.assertEquals("c", model.steps().get(0).name()); + Assertions.assertEquals("nfnbacfionlebxe", model.steps().get(0).branches().get(0).name()); + Assertions.assertEquals("gtzxdpn", model.steps().get(0).branches().get(0).actions().get(0).name()); + Assertions.assertEquals("tki", model.selectors().get(0).id()); + Assertions.assertEquals("vjsllrmvvdfw", model.customerDataStorage().storageAccountResourceId()); + Assertions.assertEquals("kpnpulexxbczwtr", model.customerDataStorage().blobContainerName()); } // Use "Map.of" if available 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 6fe4ae9e2509..58f69a0c6dfe 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 @@ -13,14 +13,16 @@ public final class ExperimentListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExperimentListResult model = BinaryData.fromString( - "{\"value\":[{\"identity\":{\"principalId\":\"iexzfeyue\",\"tenantId\":\"ibx\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"rhdwbavxbniw\":{\"principalId\":\"qwalmuzyoxaepd\",\"clientId\":\"jancu\"},\"ytxhp\":{\"principalId\":\"swzts\",\"clientId\":\"pgn\"},\"wtctyqi\":{\"principalId\":\"bzpfzab\",\"clientId\":\"cuh\"},\"kfplgmgsxnk\":{\"principalId\":\"bbovplwzbhvgyugu\",\"clientId\":\"vmkfssxqu\"}}},\"properties\":{\"provisioningState\":\"Deleting\",\"steps\":[{\"name\":\"es\",\"branches\":[{\"name\":\"vlopwiyighx\",\"actions\":[]},{\"name\":\"kdwzbaiuebbaumny\",\"actions\":[]},{\"name\":\"upedeojnabckhs\",\"actions\":[]},{\"name\":\"txp\",\"actions\":[]}]},{\"name\":\"ie\",\"branches\":[{\"name\":\"fhvpesaps\",\"actions\":[]},{\"name\":\"rdqmhjjdhtldwkyz\",\"actions\":[]},{\"name\":\"uutkncw\",\"actions\":[]},{\"name\":\"cwsvlxotog\",\"actions\":[]}]}],\"selectors\":[{\"type\":\"ChaosTargetSelector\",\"id\":\"rupqsxvnmicy\",\"filter\":{\"type\":\"ChaosTargetFilter\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"ceoveilovno\",\"filter\":{\"type\":\"ChaosTargetFilter\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"fj\",\"filter\":{\"type\":\"ChaosTargetFilter\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"njbkcnxdhbttkph\",\"filter\":{\"type\":\"ChaosTargetFilter\"}}]},\"location\":\"nv\",\"tags\":{\"crpab\":\"qnermclfplphoxu\",\"sbj\":\"ye\",\"wfqkquj\":\"azqugxywpmueefj\"},\"id\":\"dsuyonobgla\",\"name\":\"cq\",\"type\":\"tcc\"},{\"identity\":{\"principalId\":\"udxytlmoyrx\",\"tenantId\":\"fudwpznt\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"ca\":{\"principalId\":\"lrqjbhckfr\",\"clientId\":\"rxsbkyvp\"},\"kuwbcrnwb\":{\"principalId\":\"z\",\"clientId\":\"zka\"}}},\"properties\":{\"provisioningState\":\"Updating\",\"steps\":[{\"name\":\"seyvj\",\"branches\":[{\"name\":\"rts\",\"actions\":[]},{\"name\":\"hspkdeemao\",\"actions\":[]},{\"name\":\"mx\",\"actions\":[]},{\"name\":\"gkvtmelmqkrhah\",\"actions\":[]}]},{\"name\":\"ljuahaquhcdh\",\"branches\":[{\"name\":\"ualaexqpvfadmw\",\"actions\":[]},{\"name\":\"rcrgvx\",\"actions\":[]}]}],\"selectors\":[{\"type\":\"ChaosTargetSelector\",\"id\":\"gomz\",\"filter\":{\"type\":\"ChaosTargetFilter\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"misgwbnb\",\"filter\":{\"type\":\"ChaosTargetFilter\"}}]},\"location\":\"dawkzbali\",\"tags\":{\"xosow\":\"qhakauhashsf\",\"cjooxdjebwpucwwf\":\"xcug\",\"hzceuojgjrwjue\":\"ovbvmeueciv\"},\"id\":\"otwmcdyt\",\"name\":\"x\",\"type\":\"it\"},{\"identity\":{\"principalId\":\"jawgqwg\",\"tenantId\":\"ni\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"btdhxujznbm\":{\"principalId\":\"kpycgklwndnhjd\",\"clientId\":\"whvylw\"}}},\"properties\":{\"provisioningState\":\"Canceled\",\"steps\":[{\"name\":\"wpr\",\"branches\":[{\"name\":\"lve\",\"actions\":[]},{\"name\":\"alupjm\",\"actions\":[]},{\"name\":\"hfxobbcswsrtj\",\"actions\":[]},{\"name\":\"iplrbpbewtghfgb\",\"actions\":[]}]},{\"name\":\"c\",\"branches\":[{\"name\":\"xzvlvqhjkbegib\",\"actions\":[]},{\"name\":\"nmxiebwwaloayqc\",\"actions\":[]},{\"name\":\"wrtz\",\"actions\":[]}]}],\"selectors\":[{\"type\":\"ChaosTargetSelector\",\"id\":\"zg\",\"filter\":{\"type\":\"ChaosTargetFilter\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"zmh\",\"filter\":{\"type\":\"ChaosTargetFilter\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"ongmtsa\",\"filter\":{\"type\":\"ChaosTargetFilter\"}}]},\"location\":\"bp\",\"tags\":{\"rknftguvriuhprwm\":\"p\",\"bexrmcq\":\"yvxqtayriwwroy\",\"e\":\"bycnojvkn\",\"zhpvgqzcjrvxd\":\"qsgzvahapj\"},\"id\":\"zlmwlxkvugfhz\",\"name\":\"vawjvzunlu\",\"type\":\"hnnpr\"},{\"identity\":{\"principalId\":\"peilpjzuaejxdu\",\"tenantId\":\"skzbb\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"waboe\":{\"principalId\":\"veekgpwozuhkfp\",\"clientId\":\"jyofdxluusdtto\"},\"vbxwyjsflhh\":{\"principalId\":\"v\",\"clientId\":\"lns\"},\"jpkiidzyexznelix\":{\"principalId\":\"aln\",\"clientId\":\"xisxyawjoyaqcsl\"},\"aulppggd\":{\"principalId\":\"rzt\",\"clientId\":\"lhbnxkna\"}}},\"properties\":{\"provisioningState\":\"Failed\",\"steps\":[{\"name\":\"pnyiropuhp\",\"branches\":[{\"name\":\"vpgylgqgitxmed\",\"actions\":[]},{\"name\":\"v\",\"actions\":[]}]},{\"name\":\"slynqwwnc\",\"branches\":[{\"name\":\"zhxgktrmgucn\",\"actions\":[]},{\"name\":\"pkteo\",\"actions\":[]},{\"name\":\"llwptfdy\",\"actions\":[]}]},{\"name\":\"pfqbuaceopzf\",\"branches\":[{\"name\":\"hhuao\",\"actions\":[]},{\"name\":\"ppcqeqxolz\",\"actions\":[]},{\"name\":\"ahzxctobgbk\",\"actions\":[]},{\"name\":\"moizpos\",\"actions\":[]}]},{\"name\":\"mgrcfbu\",\"branches\":[{\"name\":\"mfqjhhkxbp\",\"actions\":[]},{\"name\":\"jy\",\"actions\":[]},{\"name\":\"jhxxjyn\",\"actions\":[]},{\"name\":\"u\",\"actions\":[]}]}],\"selectors\":[{\"type\":\"ChaosTargetSelector\",\"id\":\"vkr\",\"filter\":{\"type\":\"ChaosTargetFilter\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"wbxqzvszjfau\",\"filter\":{\"type\":\"ChaosTargetFilter\"}}]},\"location\":\"dxxiv\",\"tags\":{\"qaqtdoqmcbxvwvxy\":\"t\",\"obl\":\"lqbhsf\",\"bkrvrnsvshqj\":\"tkblmpewww\"},\"id\":\"hxcr\",\"name\":\"bfovasrruvwbhsq\",\"type\":\"sub\"}],\"nextLink\":\"jbi\"}") + "{\"value\":[{\"identity\":{\"principalId\":\"xbniwdjs\",\"tenantId\":\"tsdbpgn\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"tyq\":{\"principalId\":\"pzxbz\",\"clientId\":\"zabglcuhxwt\"}}},\"properties\":{\"provisioningState\":\"Failed\",\"steps\":[{\"name\":\"bovpl\",\"branches\":[{\"name\":\"bhvgy\",\"actions\":[]},{\"name\":\"gu\",\"actions\":[]},{\"name\":\"svmkfssxquk\",\"actions\":[]}]},{\"name\":\"fpl\",\"branches\":[{\"name\":\"gsxnkjzkdeslpv\",\"actions\":[]}]},{\"name\":\"opwi\",\"branches\":[{\"name\":\"ghxpkdw\",\"actions\":[]},{\"name\":\"baiuebbaumny\",\"actions\":[]}]},{\"name\":\"upedeojnabckhs\",\"branches\":[{\"name\":\"xpsiebtfhvpes\",\"actions\":[]}]}],\"selectors\":[{\"type\":\"ChaosTargetSelector\",\"id\":\"skrdqmhjj\",\"filter\":{\"type\":\"ChaosTargetFilter\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"tldwkyzxuutk\",\"filter\":{\"type\":\"ChaosTargetFilter\"}}],\"customerDataStorage\":{\"storageAccountResourceId\":\"cwsvlxotog\",\"blobContainerName\":\"rupqsxvnmicy\"}},\"location\":\"ceoveilovno\",\"tags\":{\"bkc\":\"jfcn\"},\"id\":\"x\",\"name\":\"hbttkphyw\",\"type\":\"nv\"},{\"identity\":{\"principalId\":\"qnermclfplphoxu\",\"tenantId\":\"rpabg\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"zwfqkqujidsuyon\":{\"principalId\":\"jta\",\"clientId\":\"ugxywpmueef\"}}},\"properties\":{\"provisioningState\":\"Creating\",\"steps\":[{\"name\":\"aocqxtccmgy\",\"branches\":[{\"name\":\"xy\",\"actions\":[]}]},{\"name\":\"lmoyrx\",\"branches\":[{\"name\":\"fudwpznt\",\"actions\":[]},{\"name\":\"hdzhlrqj\",\"actions\":[]},{\"name\":\"hckfrlhrx\",\"actions\":[]},{\"name\":\"bkyvp\",\"actions\":[]}]},{\"name\":\"ca\",\"branches\":[{\"name\":\"z\",\"actions\":[]},{\"name\":\"p\",\"actions\":[]},{\"name\":\"kafkuwbcrnwbm\",\"actions\":[]}]}],\"selectors\":[{\"type\":\"ChaosTargetSelector\",\"id\":\"hseyvju\",\"filter\":{\"type\":\"ChaosTargetFilter\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"tslhspkdeem\",\"filter\":{\"type\":\"ChaosTargetFilter\"}}],\"customerDataStorage\":{\"storageAccountResourceId\":\"xagkvtmelmqkrh\",\"blobContainerName\":\"vljua\"}},\"location\":\"quhcdhmduala\",\"tags\":{\"vxpvgomz\":\"pvfadmwsrcr\"},\"id\":\"fmisg\",\"name\":\"bnbbeldawkz\",\"type\":\"ali\"},{\"identity\":{\"principalId\":\"qhakauhashsf\",\"tenantId\":\"osow\",\"type\":\"None\",\"userAssignedIdentities\":{\"wfvovbv\":{\"principalId\":\"i\",\"clientId\":\"ooxdjebwpuc\"},\"wjue\":{\"principalId\":\"uecivyhz\",\"clientId\":\"uojgj\"},\"nrjawgqwg\":{\"principalId\":\"twm\",\"clientId\":\"ytdxwit\"},\"bkpyc\":{\"principalId\":\"ni\",\"clientId\":\"x\"}}},\"properties\":{\"provisioningState\":\"Creating\",\"steps\":[{\"name\":\"ndnhj\",\"branches\":[{\"name\":\"uwhvylwzbtdhxujz\",\"actions\":[]},{\"name\":\"bm\",\"actions\":[]},{\"name\":\"ow\",\"actions\":[]},{\"name\":\"wpr\",\"actions\":[]}]},{\"name\":\"qlveualupjmkh\",\"branches\":[{\"name\":\"obbc\",\"actions\":[]},{\"name\":\"wsrtjriplrbpbe\",\"actions\":[]},{\"name\":\"tghfgblcgwxzvl\",\"actions\":[]}]}],\"selectors\":[{\"type\":\"ChaosTargetSelector\",\"id\":\"hjkbegibtnmxieb\",\"filter\":{\"type\":\"ChaosTargetFilter\"}}],\"customerDataStorage\":{\"storageAccountResourceId\":\"oayqc\",\"blobContainerName\":\"rtzju\"}},\"location\":\"wyzmhtxon\",\"tags\":{\"knftguvriuh\":\"savjcbpwxqps\"},\"id\":\"rwmdyvxqtay\",\"name\":\"iwwroyqbexrmc\",\"type\":\"ibycno\"},{\"identity\":{\"principalId\":\"nmefqsgzvahapj\",\"tenantId\":\"hpvgqz\",\"type\":\"None\",\"userAssignedIdentities\":{\"hzovawjvzunlut\":{\"principalId\":\"djzlmwlx\",\"clientId\":\"ug\"},\"jzuaejxdultskzbb\":{\"principalId\":\"n\",\"clientId\":\"nxipeil\"},\"yofd\":{\"principalId\":\"zumveekgpwo\",\"clientId\":\"hkfpbs\"},\"mvb\":{\"principalId\":\"uusdttouwa\",\"clientId\":\"ekqvkeln\"}}},\"properties\":{\"provisioningState\":\"Succeeded\",\"steps\":[{\"name\":\"sflhhca\",\"branches\":[{\"name\":\"n\",\"actions\":[]},{\"name\":\"ixisxyawjoy\",\"actions\":[]},{\"name\":\"qcslyjpkiid\",\"actions\":[]}]},{\"name\":\"yexz\",\"branches\":[{\"name\":\"lixhnrztfol\",\"actions\":[]}]},{\"name\":\"bnxknalaulppg\",\"branches\":[{\"name\":\"tpnapnyiropuhpig\",\"actions\":[]},{\"name\":\"pgylg\",\"actions\":[]},{\"name\":\"git\",\"actions\":[]},{\"name\":\"medjvcslynqwwncw\",\"actions\":[]}]},{\"name\":\"zhxgktrmgucn\",\"branches\":[{\"name\":\"kteo\",\"actions\":[]},{\"name\":\"llwptfdy\",\"actions\":[]}]}],\"selectors\":[{\"type\":\"ChaosTargetSelector\",\"id\":\"fqbuaceopzf\",\"filter\":{\"type\":\"ChaosTargetFilter\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"hhuao\",\"filter\":{\"type\":\"ChaosTargetFilter\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"pcqeqx\",\"filter\":{\"type\":\"ChaosTargetFilter\"}}],\"customerDataStorage\":{\"storageAccountResourceId\":\"ahzxctobgbk\",\"blobContainerName\":\"oizpostmgrcfbun\"}},\"location\":\"fqjhhkxbpvjymj\",\"tags\":{\"n\":\"j\",\"ivkrtsw\":\"u\",\"vjfdx\":\"xqzvszjfa\"},\"id\":\"ivetvtcq\",\"name\":\"qtdo\",\"type\":\"mcbxvwvxysl\"}],\"nextLink\":\"hsfxoblytkb\"}") .toObject(ExperimentListResult.class); - Assertions.assertEquals("nv", model.value().get(0).location()); - Assertions.assertEquals("qnermclfplphoxu", model.value().get(0).tags().get("crpab")); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("es", model.value().get(0).steps().get(0).name()); - Assertions.assertEquals("vlopwiyighx", model.value().get(0).steps().get(0).branches().get(0).name()); - Assertions.assertEquals("rupqsxvnmicy", model.value().get(0).selectors().get(0).id()); - Assertions.assertEquals("jbi", model.nextLink()); + Assertions.assertEquals("ceoveilovno", model.value().get(0).location()); + Assertions.assertEquals("jfcn", model.value().get(0).tags().get("bkc")); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.value().get(0).identity().type()); + Assertions.assertEquals("bovpl", model.value().get(0).steps().get(0).name()); + Assertions.assertEquals("bhvgy", model.value().get(0).steps().get(0).branches().get(0).name()); + Assertions.assertEquals("skrdqmhjj", model.value().get(0).selectors().get(0).id()); + Assertions.assertEquals("cwsvlxotog", model.value().get(0).customerDataStorage().storageAccountResourceId()); + Assertions.assertEquals("rupqsxvnmicy", model.value().get(0).customerDataStorage().blobContainerName()); + Assertions.assertEquals("hsfxoblytkb", model.nextLink()); } } 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 cfdfcdca5243..8b506cc94c0e 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 @@ -11,6 +11,7 @@ import com.azure.resourcemanager.chaos.models.ChaosExperimentStep; import com.azure.resourcemanager.chaos.models.ChaosTargetFilter; import com.azure.resourcemanager.chaos.models.ChaosTargetSelector; +import com.azure.resourcemanager.chaos.models.CustomerDataStorageProperties; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -18,45 +19,34 @@ public final class ExperimentPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExperimentProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Updating\",\"steps\":[{\"name\":\"idyjrrfbyaosvexc\",\"branches\":[{\"name\":\"npc\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"ocohslkevleg\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"zfbuhf\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"vfaxkffeiith\"}]}]},{\"name\":\"vmezy\",\"branches\":[{\"name\":\"hxmzsbbzoggig\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"wburvjxxjnspydpt\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"oenkouknvudwti\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"kbldngkpocipa\"}]},{\"name\":\"yxoegukgjnp\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"cgygev\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"zntypmrb\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"izcdrqjsd\"}]},{\"name\":\"ydnfyhxdeoejz\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"w\"}]},{\"name\":\"fsj\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"gzfbishcbk\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"ajdeyeamdphaga\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"pbuxwgipwhon\"}]}]}],\"selectors\":[{\"type\":\"ChaosTargetSelector\",\"id\":\"kgshwa\",\"filter\":{\"type\":\"ChaosTargetFilter\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"ixzbinjeputtmryw\",\"filter\":{\"type\":\"ChaosTargetFilter\"}}]}") + "{\"provisioningState\":\"Updating\",\"steps\":[{\"name\":\"ngkpocipazy\",\"branches\":[{\"name\":\"egukgjnpiucg\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"evqzntypmrbp\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"zcdrqjsdpydnfyhx\"}]}]}],\"selectors\":[{\"type\":\"ChaosTargetSelector\",\"id\":\"oejzi\",\"filter\":{\"type\":\"ChaosTargetFilter\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"ifsjttgzfbishcb\",\"filter\":{\"type\":\"ChaosTargetFilter\"}}],\"customerDataStorage\":{\"storageAccountResourceId\":\"deyeamdphagalpbu\",\"blobContainerName\":\"gipwhonowkg\"}}") .toObject(ExperimentProperties.class); - Assertions.assertEquals("idyjrrfbyaosvexc", model.steps().get(0).name()); - Assertions.assertEquals("npc", model.steps().get(0).branches().get(0).name()); - Assertions.assertEquals("ocohslkevleg", model.steps().get(0).branches().get(0).actions().get(0).name()); - Assertions.assertEquals("kgshwa", model.selectors().get(0).id()); + Assertions.assertEquals("ngkpocipazy", model.steps().get(0).name()); + Assertions.assertEquals("egukgjnpiucg", model.steps().get(0).branches().get(0).name()); + Assertions.assertEquals("evqzntypmrbp", model.steps().get(0).branches().get(0).actions().get(0).name()); + Assertions.assertEquals("oejzi", model.selectors().get(0).id()); + Assertions.assertEquals("deyeamdphagalpbu", model.customerDataStorage().storageAccountResourceId()); + Assertions.assertEquals("gipwhonowkg", model.customerDataStorage().blobContainerName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ExperimentProperties model = new ExperimentProperties() - .withSteps(Arrays.asList( - new ChaosExperimentStep().withName("idyjrrfbyaosvexc") - .withBranches(Arrays.asList(new ChaosExperimentBranch().withName("npc") - .withActions(Arrays.asList(new ChaosExperimentAction().withName("ocohslkevleg"), - new ChaosExperimentAction().withName("zfbuhf"), - new ChaosExperimentAction().withName("vfaxkffeiith"))))), - new ChaosExperimentStep().withName("vmezy") - .withBranches(Arrays.asList( - new ChaosExperimentBranch().withName("hxmzsbbzoggig") - .withActions(Arrays.asList(new ChaosExperimentAction().withName("wburvjxxjnspydpt"), - new ChaosExperimentAction().withName("oenkouknvudwti"), - new ChaosExperimentAction().withName("kbldngkpocipa"))), - new ChaosExperimentBranch().withName("yxoegukgjnp") - .withActions(Arrays.asList(new ChaosExperimentAction().withName("cgygev"), - new ChaosExperimentAction().withName("zntypmrb"), - new ChaosExperimentAction().withName("izcdrqjsd"))), - new ChaosExperimentBranch().withName("ydnfyhxdeoejz") - .withActions(Arrays.asList(new ChaosExperimentAction().withName("w"))), - new ChaosExperimentBranch().withName("fsj") - .withActions(Arrays.asList(new ChaosExperimentAction().withName("gzfbishcbk"), - new ChaosExperimentAction().withName("ajdeyeamdphaga"), - new ChaosExperimentAction().withName("pbuxwgipwhon"))))))) - .withSelectors(Arrays.asList(new ChaosTargetSelector().withId("kgshwa").withFilter(new ChaosTargetFilter()), - new ChaosTargetSelector().withId("ixzbinjeputtmryw").withFilter(new ChaosTargetFilter()))); + .withSteps(Arrays.asList(new ChaosExperimentStep().withName("ngkpocipazy") + .withBranches(Arrays.asList(new ChaosExperimentBranch().withName("egukgjnpiucg") + .withActions(Arrays.asList(new ChaosExperimentAction().withName("evqzntypmrbp"), + new ChaosExperimentAction().withName("zcdrqjsdpydnfyhx"))))))) + .withSelectors(Arrays.asList(new ChaosTargetSelector().withId("oejzi").withFilter(new ChaosTargetFilter()), + new ChaosTargetSelector().withId("ifsjttgzfbishcb").withFilter(new ChaosTargetFilter()))) + .withCustomerDataStorage( + new CustomerDataStorageProperties().withStorageAccountResourceId("deyeamdphagalpbu") + .withBlobContainerName("gipwhonowkg")); model = BinaryData.fromObject(model).toObject(ExperimentProperties.class); - Assertions.assertEquals("idyjrrfbyaosvexc", model.steps().get(0).name()); - Assertions.assertEquals("npc", model.steps().get(0).branches().get(0).name()); - Assertions.assertEquals("ocohslkevleg", model.steps().get(0).branches().get(0).actions().get(0).name()); - Assertions.assertEquals("kgshwa", model.selectors().get(0).id()); + Assertions.assertEquals("ngkpocipazy", model.steps().get(0).name()); + Assertions.assertEquals("egukgjnpiucg", model.steps().get(0).branches().get(0).name()); + Assertions.assertEquals("evqzntypmrbp", model.steps().get(0).branches().get(0).actions().get(0).name()); + Assertions.assertEquals("oejzi", model.selectors().get(0).id()); + Assertions.assertEquals("deyeamdphagalpbu", model.customerDataStorage().storageAccountResourceId()); + Assertions.assertEquals("gipwhonowkg", model.customerDataStorage().blobContainerName()); } } 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 3c84ff60379a..d901508f4b74 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 @@ -17,21 +17,21 @@ public final class ExperimentUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExperimentUpdate model = BinaryData.fromString( - "{\"tags\":{\"arbu\":\"bfs\"},\"identity\":{\"principalId\":\"vpnazzm\",\"tenantId\":\"runmp\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"qidybyx\":{\"principalId\":\"hrbnlankxmyskpbh\",\"clientId\":\"btkcxywnytnrsyn\"},\"hsucoc\":{\"principalId\":\"fclhaaxdbabphlwr\",\"clientId\":\"fkts\"},\"uedck\":{\"principalId\":\"yyazttbt\",\"clientId\":\"rq\"}}}}") + "{\"tags\":{\"nbtkcxywnytnr\":\"pbh\"},\"identity\":{\"principalId\":\"lqidyby\",\"tenantId\":\"zfcl\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"ocmnyyazttbtwwrq\":{\"principalId\":\"babphlwrqlfk\",\"clientId\":\"thsu\"},\"hqwa\":{\"principalId\":\"edckzywbiexzfey\",\"clientId\":\"axibxujw\"},\"d\":{\"principalId\":\"uzyoxaep\",\"clientId\":\"zjancuxr\"}}}}") .toObject(ExperimentUpdate.class); - Assertions.assertEquals("bfs", model.tags().get("arbu")); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.identity().type()); + Assertions.assertEquals("pbh", model.tags().get("nbtkcxywnytnr")); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ExperimentUpdate model = new ExperimentUpdate().withTags(mapOf("arbu", "bfs")) - .withIdentity(new ResourceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("qidybyx", new UserAssignedIdentity(), "hsucoc", - new UserAssignedIdentity(), "uedck", new UserAssignedIdentity()))); + ExperimentUpdate model = new ExperimentUpdate().withTags(mapOf("nbtkcxywnytnr", "pbh")) + .withIdentity(new ResourceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) + .withUserAssignedIdentities(mapOf("ocmnyyazttbtwwrq", new UserAssignedIdentity(), "hqwa", + new UserAssignedIdentity(), "d", new UserAssignedIdentity()))); model = BinaryData.fromObject(model).toObject(ExperimentUpdate.class); - Assertions.assertEquals("bfs", model.tags().get("arbu")); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.identity().type()); + Assertions.assertEquals("pbh", model.tags().get("nbtkcxywnytnr")); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); } // 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 bb4088731dcc..96434d229ff2 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 @@ -14,6 +14,7 @@ import com.azure.resourcemanager.chaos.models.ChaosExperimentStep; import com.azure.resourcemanager.chaos.models.ChaosTargetFilter; import com.azure.resourcemanager.chaos.models.ChaosTargetSelector; +import com.azure.resourcemanager.chaos.models.CustomerDataStorageProperties; import com.azure.resourcemanager.chaos.models.Experiment; import com.azure.resourcemanager.chaos.models.ManagedServiceIdentityType; import com.azure.resourcemanager.chaos.models.ResourceIdentity; @@ -31,7 +32,7 @@ public final class ExperimentsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"identity\":{\"principalId\":\"tac\",\"tenantId\":\"bj\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"uxxpshne\":{\"principalId\":\"jznmwcpmguaa\",\"clientId\":\"aufactkahzovajjz\"},\"jbazpjuohminy\":{\"principalId\":\"ulfgslqu\",\"clientId\":\"wdlenrdsut\"},\"epn\":{\"principalId\":\"norwmduvwpklvx\",\"clientId\":\"ygdxpgpqchis\"},\"kwbqplhlvnuu\":{\"principalId\":\"jcrxgibbdaxcon\",\"clientId\":\"zauorsuk\"}}},\"properties\":{\"provisioningState\":\"Succeeded\",\"steps\":[{\"name\":\"r\",\"branches\":[{\"name\":\"wzsoldweyuqdunv\",\"actions\":[]}]},{\"name\":\"nnrwrbiork\",\"branches\":[{\"name\":\"lywjhh\",\"actions\":[]},{\"name\":\"dnhxmsi\",\"actions\":[]},{\"name\":\"fomiloxgg\",\"actions\":[]}]},{\"name\":\"ufiqndieuzaof\",\"branches\":[{\"name\":\"hvcyyysfg\",\"actions\":[]},{\"name\":\"otcubi\",\"actions\":[]},{\"name\":\"p\",\"actions\":[]}]}],\"selectors\":[{\"type\":\"ChaosTargetSelector\",\"id\":\"pwoqo\",\"filter\":{\"type\":\"ChaosTargetFilter\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"acjekni\",\"filter\":{\"type\":\"ChaosTargetFilter\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"hqvcimpevfgmblr\",\"filter\":{\"type\":\"ChaosTargetFilter\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"lbywdxsm\",\"filter\":{\"type\":\"ChaosTargetFilter\"}}]},\"location\":\"wrwfscjfnyns\",\"tags\":{\"byowbblgyavutp\":\"jizdvoqyt\"},\"id\":\"hjoxo\",\"name\":\"smsks\",\"type\":\"pi\"}"; + = "{\"identity\":{\"principalId\":\"sgb\",\"tenantId\":\"antuygdhgaqipirp\",\"type\":\"None\",\"userAssignedIdentities\":{\"uuerctatoyi\":{\"principalId\":\"fulopmjnlexwhcb\",\"clientId\":\"ibkeph\"}}},\"properties\":{\"provisioningState\":\"Succeeded\",\"steps\":[{\"name\":\"brlc\",\"branches\":[{\"name\":\"duczkgof\",\"actions\":[]},{\"name\":\"y\",\"actions\":[]},{\"name\":\"srucvcrrpcjtt\",\"actions\":[]},{\"name\":\"st\",\"actions\":[]}]},{\"name\":\"jeaq\",\"branches\":[{\"name\":\"mvvfko\",\"actions\":[]},{\"name\":\"mlghktuidvrmazlp\",\"actions\":[]},{\"name\":\"wwexymzvlazipbh\",\"actions\":[]},{\"name\":\"wvqsgny\",\"actions\":[]}]},{\"name\":\"uuzivensrpmeyyvp\",\"branches\":[{\"name\":\"atlb\",\"actions\":[]},{\"name\":\"jp\",\"actions\":[]}]},{\"name\":\"gsksrfhf\",\"branches\":[{\"name\":\"lmknbnxwcdom\",\"actions\":[]}]}],\"selectors\":[{\"type\":\"ChaosTargetSelector\",\"id\":\"vfqawzfgbrttuiac\",\"filter\":{\"type\":\"ChaosTargetFilter\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"iexhajl\",\"filter\":{\"type\":\"ChaosTargetFilter\"}}],\"customerDataStorage\":{\"storageAccountResourceId\":\"iqfyuttdi\",\"blobContainerName\":\"b\"}},\"location\":\"n\",\"tags\":{\"yctww\":\"mtx\",\"cvogygzyvne\":\"zwxjlm\",\"zbkr\":\"zaifghtmoqqtlff\"},\"id\":\"jjjavfqnvhnq\",\"name\":\"ewdogiyetesy\",\"type\":\"vidbztjhqtfb\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -42,28 +43,52 @@ public void testCreateOrUpdate() throws Exception { Experiment response = manager.experiments() - .define("kwcf") - .withRegion("kqfqjbvl") - .withExistingResourceGroup("msvpkjpr") - .withSteps(Arrays.asList(new ChaosExperimentStep().withName("dlwwqfbumlkxt") - .withBranches(Arrays.asList( - new ChaosExperimentBranch().withName("jfsmlmbtxhwgfwsr").withActions(Arrays.asList()), - new ChaosExperimentBranch().withName("a").withActions(Arrays.asList()), - new ChaosExperimentBranch().withName("coezbrhubskh").withActions(Arrays.asList()))))) + .define("oawjqoyueay") + .withRegion("wggahttzlswvaj") + .withExistingResourceGroup("zezkhhltnjadh") + .withSteps( + Arrays.asList( + new ChaosExperimentStep().withName("vqvwzkjopwbe") + .withBranches( + Arrays.asList(new ChaosExperimentBranch().withName("r").withActions(Arrays.asList()), + new ChaosExperimentBranch().withName("kwzdqybxcea").withActions(Arrays.asList()), + new ChaosExperimentBranch().withName("xcptsoqfyiaseqc") + .withActions(Arrays.asList()))), + new ChaosExperimentStep().withName("krtt") + .withBranches(Arrays.asList( + new ChaosExperimentBranch().withName("azisgyk").withActions(Arrays.asList()), + new ChaosExperimentBranch().withName("uem").withActions(Arrays.asList()))), + new ChaosExperimentStep().withName("anbwzohmnrxxbso") + .withBranches(Arrays.asList( + new ChaosExperimentBranch().withName("linhmdptysprqs").withActions(Arrays.asList()), + new ChaosExperimentBranch().withName("nzxojpslsvjgpli").withActions(Arrays.asList()), + new ChaosExperimentBranch().withName("fiqwoy").withActions(Arrays.asList()), + new ChaosExperimentBranch().withName("qvapcohhoucq").withActions(Arrays.asList()))), + new ChaosExperimentStep().withName("q") + .withBranches(Arrays.asList( + new ChaosExperimentBranch().withName("xcxzrzdcgdzben").withActions(Arrays.asList()))))) .withSelectors( - Arrays.asList(new ChaosTargetSelector().withId("ygo").withFilter(new ChaosTargetFilter()))) - .withTags(mapOf("qybaryeua", "fmluiqtqzfavyvn", "qgzsles", "jkqa", "vbquwr", "cbhernntiewdj")) - .withIdentity(new ResourceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("wrck", new UserAssignedIdentity(), "uudl", - new UserAssignedIdentity(), "lhpl", new UserAssignedIdentity()))) + Arrays.asList(new ChaosTargetSelector().withId("bcawetz").withFilter(new ChaosTargetFilter()), + new ChaosTargetSelector().withId("dtjwfljhznamt").withFilter(new ChaosTargetFilter()), + new ChaosTargetSelector().withId("tmzwcjjn").withFilter(new ChaosTargetFilter()), + new ChaosTargetSelector().withId("tjzmi").withFilter(new ChaosTargetFilter()))) + .withTags( + mapOf("x", "t", "unwqr", "oqza", "uocnjrohmbpyr", "zfrgqhaohcm", "ocxnehvsmtodl", "xameblydyvkfkm")) + .withIdentity(new ResourceIdentity().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("dhxiidlopedbwd", new UserAssignedIdentity(), "jelaqacigele", + new UserAssignedIdentity()))) + .withCustomerDataStorage(new CustomerDataStorageProperties().withStorageAccountResourceId("gat") + .withBlobContainerName("uvbxngr")) .create(); - Assertions.assertEquals("wrwfscjfnyns", response.location()); - Assertions.assertEquals("jizdvoqyt", response.tags().get("byowbblgyavutp")); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, response.identity().type()); - Assertions.assertEquals("r", response.steps().get(0).name()); - Assertions.assertEquals("wzsoldweyuqdunv", response.steps().get(0).branches().get(0).name()); - Assertions.assertEquals("pwoqo", response.selectors().get(0).id()); + Assertions.assertEquals("n", response.location()); + Assertions.assertEquals("mtx", response.tags().get("yctww")); + Assertions.assertEquals(ManagedServiceIdentityType.NONE, response.identity().type()); + Assertions.assertEquals("brlc", response.steps().get(0).name()); + Assertions.assertEquals("duczkgof", response.steps().get(0).branches().get(0).name()); + Assertions.assertEquals("vfqawzfgbrttuiac", response.selectors().get(0).id()); + Assertions.assertEquals("iqfyuttdi", response.customerDataStorage().storageAccountResourceId()); + Assertions.assertEquals("b", response.customerDataStorage().blobContainerName()); } // 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 8e08be9754c1..80f8b7fd8c42 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 @@ -20,7 +20,7 @@ public final class ExperimentsExecutionDetailsWithResponseMockTests { @Test public void testExecutionDetailsWithResponse() throws Exception { String responseStr - = "{\"type\":\"eacvl\",\"id\":\"ygdyftumrtw\",\"name\":\"wjslbiwkojgcyzt\",\"properties\":{\"status\":\"z\",\"startedAt\":\"2021-07-03T06:16:35Z\",\"stoppedAt\":\"2021-03-07T16:28:02Z\",\"failureReason\":\"hchqnrnrpx\",\"lastActionAt\":\"2021-08-04T01:59:45Z\",\"runInformation\":{\"steps\":[{\"stepName\":\"qgaifmviklbydv\",\"stepId\":\"bejdznxcv\",\"status\":\"rhnj\",\"branches\":[{},{},{}]},{\"stepName\":\"v\",\"stepId\":\"ovqfzge\",\"status\":\"dftuljltduce\",\"branches\":[{},{},{},{}]},{\"stepName\":\"czu\",\"stepId\":\"ejwcwwqiok\",\"status\":\"sx\",\"branches\":[{},{}]}]}}}"; + = "{\"type\":\"p\",\"id\":\"kdqzrdzsylo\",\"name\":\"gtrczzydmxzjijpv\",\"properties\":{\"status\":\"rkihcirld\",\"startedAt\":\"2021-09-20T22:33:09Z\",\"stoppedAt\":\"2021-05-06T09:32:51Z\",\"provisioningState\":\"Canceled\",\"failureReason\":\"nbkkjanurnnq\",\"lastActionAt\":\"2021-11-30T17:42:01Z\",\"runInformation\":{\"steps\":[{\"stepName\":\"xqltgrd\",\"stepId\":\"ypxrx\",\"status\":\"fihwu\",\"branches\":[{},{},{}]},{\"stepName\":\"a\",\"stepId\":\"rbxrblmliowxihsp\",\"status\":\"wqagnepzwa\",\"branches\":[{}]},{\"stepName\":\"sbq\",\"stepId\":\"agwwrxaom\",\"status\":\"sgl\",\"branches\":[{},{},{}]}]}}}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testExecutionDetailsWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ExperimentExecutionDetails response = manager.experiments() - .executionDetailsWithResponse("fqntcyp", "xjvfoimwksl", "rcizjxvyd", com.azure.core.util.Context.NONE) + .executionDetailsWithResponse("vxnqmhrpqpd", "wmkoisq", "ssffxuifmc", 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 a3bcba5b8d67..8af171e60cd2 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 @@ -22,7 +22,7 @@ public final class ExperimentsGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"identity\":{\"principalId\":\"fcqdpsq\",\"tenantId\":\"vpsvuoymgcce\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"edkowepbqpcrfk\":{\"principalId\":\"ypql\",\"clientId\":\"eokerqwkyhkobopg\"},\"y\":{\"principalId\":\"ccsnjvcdwxlpq\",\"clientId\":\"ftnkhtj\"},\"ywkbirryuzhlhkjo\":{\"principalId\":\"gwfqatmt\",\"clientId\":\"tmdvypgikdgs\"},\"ool\":{\"principalId\":\"vqqaatjinrvgo\",\"clientId\":\"mfiibfggj\"}}},\"properties\":{\"provisioningState\":\"Creating\",\"steps\":[{\"name\":\"kvtkkg\",\"branches\":[{\"name\":\"qwjygvja\",\"actions\":[]},{\"name\":\"vblm\",\"actions\":[]},{\"name\":\"vkzuhbxvvyhgso\",\"actions\":[]},{\"name\":\"byrqufeg\",\"actions\":[]}]}],\"selectors\":[{\"type\":\"ChaosTargetSelector\",\"id\":\"vwz\",\"filter\":{\"type\":\"ChaosTargetFilter\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"nhlmctlpdng\",\"filter\":{\"type\":\"ChaosTargetFilter\"}}]},\"location\":\"gbmhrixkwmyi\",\"tags\":{\"hbpnaixexccbd\":\"veg\",\"htpwij\":\"eaxhcexdrrvqahqk\",\"bfvoowvrv\":\"hyjsvfycx\",\"jqppyostronzmy\":\"t\"},\"id\":\"gfipnsxk\",\"name\":\"cwaekrrjre\",\"type\":\"fxtsgum\"}"; + = "{\"identity\":{\"principalId\":\"rtws\",\"tenantId\":\"vv\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"hoocl\":{\"principalId\":\"vtrrmhwrbfdpyflu\",\"clientId\":\"vjglrocuyzlwhhme\"},\"ujxsglhsr\":{\"principalId\":\"n\",\"clientId\":\"memczjkmmyk\"},\"qyhqo\":{\"principalId\":\"yejylmbkzudnigrf\",\"clientId\":\"otjewlpxuzzjgnre\"}}},\"properties\":{\"provisioningState\":\"Creating\",\"steps\":[{\"name\":\"iqakydiwfbr\",\"branches\":[{\"name\":\"pzdqtvhcspod\",\"actions\":[]},{\"name\":\"qaxsipietgbebjf\",\"actions\":[]},{\"name\":\"lbmoichd\",\"actions\":[]}]},{\"name\":\"pnfpubntnbat\",\"branches\":[{\"name\":\"iqsowsaaelc\",\"actions\":[]},{\"name\":\"ttcjuhplrvkmjc\",\"actions\":[]},{\"name\":\"mjvlgfgg\",\"actions\":[]},{\"name\":\"vkyylizrzbjpsf\",\"actions\":[]}]},{\"name\":\"sfuztlvtmv\",\"branches\":[{\"name\":\"bwidql\",\"actions\":[]},{\"name\":\"hukoveofizrv\",\"actions\":[]},{\"name\":\"f\",\"actions\":[]}]},{\"name\":\"mjm\",\"branches\":[{\"name\":\"wyzgiblkuj\",\"actions\":[]},{\"name\":\"llfojuidjp\",\"actions\":[]}]}],\"selectors\":[{\"type\":\"ChaosTargetSelector\",\"id\":\"yjucejikzoeo\",\"filter\":{\"type\":\"ChaosTargetFilter\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"tzejetjklnt\",\"filter\":{\"type\":\"ChaosTargetFilter\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"yjuzkdb\",\"filter\":{\"type\":\"ChaosTargetFilter\"}}],\"customerDataStorage\":{\"storageAccountResourceId\":\"xrzvhqjwtrhtgvgz\",\"blobContainerName\":\"rrkolawjmjs\"}},\"location\":\"rokcdxfzzzwyjaf\",\"tags\":{\"mozusgzvlnsnnjz\":\"hguynuchlgmltxdw\",\"mwamxqzragpgdph\":\"pafolp\"},\"id\":\"vdulajv\",\"name\":\"ejchcsrlz\",\"type\":\"nmzlanru\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,14 +32,16 @@ public void testGetByResourceGroupWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Experiment response = manager.experiments() - .getByResourceGroupWithResponse("lvdnkfx", "semdwzrmu", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("fjmzsyzfho", "lhikcyychunsj", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("gbmhrixkwmyi", response.location()); - Assertions.assertEquals("veg", response.tags().get("hbpnaixexccbd")); + Assertions.assertEquals("rokcdxfzzzwyjaf", response.location()); + Assertions.assertEquals("hguynuchlgmltxdw", response.tags().get("mozusgzvlnsnnjz")); Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, response.identity().type()); - Assertions.assertEquals("kvtkkg", response.steps().get(0).name()); - Assertions.assertEquals("qwjygvja", response.steps().get(0).branches().get(0).name()); - Assertions.assertEquals("vwz", response.selectors().get(0).id()); + Assertions.assertEquals("iqakydiwfbr", response.steps().get(0).name()); + Assertions.assertEquals("pzdqtvhcspod", response.steps().get(0).branches().get(0).name()); + Assertions.assertEquals("yjucejikzoeo", response.selectors().get(0).id()); + Assertions.assertEquals("xrzvhqjwtrhtgvgz", response.customerDataStorage().storageAccountResourceId()); + Assertions.assertEquals("rrkolawjmjs", response.customerDataStorage().blobContainerName()); } } 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 e4835cc7c722..6fe29b3b7450 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 @@ -20,7 +20,7 @@ public final class ExperimentsGetExecutionWithResponseMockTests { @Test public void testGetExecutionWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"status\":\"zuhx\",\"startedAt\":\"2021-09-05T18:25:18Z\",\"stoppedAt\":\"2021-11-07T03:07:36Z\"},\"id\":\"ihhyuspskasd\",\"name\":\"lmfwdgzx\",\"type\":\"lucvpam\"}"; + = "{\"properties\":{\"status\":\"sizmoae\",\"startedAt\":\"2021-04-21T03:07:40Z\",\"stoppedAt\":\"2021-01-30T15:33:29Z\",\"provisioningState\":\"Deleting\"},\"id\":\"edwcgyee\",\"name\":\"xeiqbpsmg\",\"type\":\"mguaml\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetExecutionWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ExperimentExecution response = manager.experiments() - .getExecutionWithResponse("rymsgaojfmw", "cotmr", "hirctymoxoftpipi", com.azure.core.util.Context.NONE) + .getExecutionWithResponse("eeyaswl", "augmrmfjlr", "wtoaukhfk", 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 e9ab6ab8955c..4a3f6f6384ec 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 @@ -21,7 +21,7 @@ public final class ExperimentsListAllExecutionsMockTests { @Test public void testListAllExecutions() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"status\":\"wp\",\"startedAt\":\"2021-04-21T19:26:02Z\",\"stoppedAt\":\"2021-05-30T11:00:48Z\"},\"id\":\"gjup\",\"name\":\"uutpwoqhih\",\"type\":\"jqgwzp\"}]}"; + = "{\"value\":[{\"properties\":{\"status\":\"kympqanxrjkixtw\",\"startedAt\":\"2021-11-28T23:05:19Z\",\"stoppedAt\":\"2021-11-26T22:43:20Z\",\"provisioningState\":\"Deleting\"},\"id\":\"ghshxcylhkgmnsg\",\"name\":\"pxycphdr\",\"type\":\"jjkhvyomaclu\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,8 +30,8 @@ public void testListAllExecutions() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response = manager.experiments() - .listAllExecutions("sreuzvxurisjnh", "ytxifqjzgxmrh", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.experiments().listAllExecutions("dlrgms", "lzgaufcshhvnew", 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 4607904a62e8..3cfdef25b0c4 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 @@ -23,7 +23,7 @@ public final class ExperimentsListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"identity\":{\"principalId\":\"lfktgplcrpwjxe\",\"tenantId\":\"oi\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"azej\":{\"principalId\":\"w\",\"clientId\":\"kpnb\"},\"azpxdtnkdmkqjjl\":{\"principalId\":\"qkagfhsxt\",\"clientId\":\"ugzxnf\"},\"wfff\":{\"principalId\":\"envrkpyouaibrebq\",\"clientId\":\"ysjkixqtnqttez\"},\"d\":{\"principalId\":\"kpj\",\"clientId\":\"qmt\"}}},\"properties\":{\"provisioningState\":\"Failed\",\"steps\":[{\"name\":\"jihy\",\"branches\":[{\"name\":\"zphv\",\"actions\":[]},{\"name\":\"auyqncygupkv\",\"actions\":[]},{\"name\":\"p\",\"actions\":[]},{\"name\":\"dscwxqupevzhf\",\"actions\":[]}]},{\"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\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"hxumwctondzj\",\"filter\":{\"type\":\"ChaosTargetFilter\"}}]},\"location\":\"dfdlwggyts\",\"tags\":{\"x\":\"ovvtgseinqfiu\"},\"id\":\"knpirgnepttwq\",\"name\":\"sniffc\",\"type\":\"mqnrojlpijnkr\"}]}"; + = "{\"value\":[{\"identity\":{\"principalId\":\"mqrhvthl\",\"tenantId\":\"wdcxsmlzzhz\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"rbgjekglkl\":{\"principalId\":\"lgyd\",\"clientId\":\"qvlnnpxybafiqgea\"},\"hj\":{\"principalId\":\"ulidwc\",\"clientId\":\"mzegjon\"},\"tdigsxcdglj\":{\"principalId\":\"wgdnqzbr\",\"clientId\":\"spzhzmtksjc\"},\"mdgycxn\":{\"principalId\":\"keuachtomf\",\"clientId\":\"ytswfp\"}}},\"properties\":{\"provisioningState\":\"Creating\",\"steps\":[{\"name\":\"hqjjys\",\"branches\":[{\"name\":\"rlpshhkv\",\"actions\":[]},{\"name\":\"edwqslsrh\",\"actions\":[]}]},{\"name\":\"pq\",\"branches\":[{\"name\":\"wskondcbrwimuvqe\",\"actions\":[]},{\"name\":\"osovyrrleaesin\",\"actions\":[]}]},{\"name\":\"qtljqobbpihehc\",\"branches\":[{\"name\":\"ybmrqbrjbbmp\",\"actions\":[]}]},{\"name\":\"dlvykfrex\",\"branches\":[{\"name\":\"s\",\"actions\":[]},{\"name\":\"qwjksghudgz\",\"actions\":[]},{\"name\":\"xog\",\"actions\":[]},{\"name\":\"ggsvoujkxibdaf\",\"actions\":[]}]}],\"selectors\":[{\"type\":\"ChaosTargetSelector\",\"id\":\"kmdyomkxfbvfbh\",\"filter\":{\"type\":\"ChaosTargetFilter\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"i\",\"filter\":{\"type\":\"ChaosTargetFilter\"}}],\"customerDataStorage\":{\"storageAccountResourceId\":\"pgddeimawz\",\"blobContainerName\":\"gkkumuikjcj\"}},\"location\":\"ztbws\",\"tags\":{\"ytwvczcswkacve\":\"owxwcomli\",\"pqthehnmnaoya\":\"yfdvlvhbwrnfxtgd\"},\"id\":\"kcoeqswank\",\"name\":\"t\",\"type\":\"tmhdroznnhdr\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,15 +32,17 @@ public void testListByResourceGroup() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response = manager.experiments() - .listByResourceGroup("jglikkxwslolb", false, "vuzlm", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.experiments().listByResourceGroup("dwv", true, "hcnzqt", com.azure.core.util.Context.NONE); - Assertions.assertEquals("dfdlwggyts", response.iterator().next().location()); - Assertions.assertEquals("ovvtgseinqfiu", response.iterator().next().tags().get("x")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, - response.iterator().next().identity().type()); - Assertions.assertEquals("jihy", response.iterator().next().steps().get(0).name()); - Assertions.assertEquals("zphv", response.iterator().next().steps().get(0).branches().get(0).name()); - Assertions.assertEquals("wjchrdg", response.iterator().next().selectors().get(0).id()); + Assertions.assertEquals("ztbws", response.iterator().next().location()); + Assertions.assertEquals("owxwcomli", response.iterator().next().tags().get("ytwvczcswkacve")); + Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, response.iterator().next().identity().type()); + Assertions.assertEquals("hqjjys", response.iterator().next().steps().get(0).name()); + Assertions.assertEquals("rlpshhkv", response.iterator().next().steps().get(0).branches().get(0).name()); + Assertions.assertEquals("kmdyomkxfbvfbh", response.iterator().next().selectors().get(0).id()); + Assertions.assertEquals("pgddeimawz", + response.iterator().next().customerDataStorage().storageAccountResourceId()); + Assertions.assertEquals("gkkumuikjcj", response.iterator().next().customerDataStorage().blobContainerName()); } } 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 566b2d6fa2f6..8fb712e40372 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 @@ -23,7 +23,7 @@ public final class ExperimentsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"identity\":{\"principalId\":\"tizzronasxif\",\"tenantId\":\"zq\",\"type\":\"None\",\"userAssignedIdentities\":{\"thrrgh\":{\"principalId\":\"wesgogczh\",\"clientId\":\"nxkrlgnyhmossxkk\"}}},\"properties\":{\"provisioningState\":\"Failed\",\"steps\":[{\"name\":\"hqxvcxgfrpdsofbs\",\"branches\":[{\"name\":\"nsvbuswdv\",\"actions\":[]},{\"name\":\"yybyc\",\"actions\":[]},{\"name\":\"unvjsrtkfawnopq\",\"actions\":[]}]},{\"name\":\"ikyzirtxdy\",\"branches\":[{\"name\":\"zejntps\",\"actions\":[]}]}],\"selectors\":[{\"type\":\"ChaosTargetSelector\",\"id\":\"gioilqu\",\"filter\":{\"type\":\"ChaosTargetFilter\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"ydxtqm\",\"filter\":{\"type\":\"ChaosTargetFilter\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"ox\",\"filter\":{\"type\":\"ChaosTargetFilter\"}}]},\"location\":\"gufhyaomtbg\",\"tags\":{\"jzhpjbibgjmfx\":\"vgrvkffo\",\"cluyovwxnbkf\":\"mv\",\"zbomvzzbtdcqvpni\":\"zzxscyhwzdgiruj\"},\"id\":\"ujviylwdshfs\",\"name\":\"n\",\"type\":\"bgye\"}]}"; + = "{\"value\":[{\"identity\":{\"principalId\":\"ae\",\"tenantId\":\"zgfbukklelssx\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"ewbidyvteowxv\":{\"principalId\":\"xzujksrlsm\",\"clientId\":\"sqplpvmjcd\"}}},\"properties\":{\"provisioningState\":\"Deleting\",\"steps\":[{\"name\":\"deugf\",\"branches\":[{\"name\":\"zec\",\"actions\":[]},{\"name\":\"axwk\",\"actions\":[]},{\"name\":\"fykhvuhxepmru\",\"actions\":[]},{\"name\":\"znabaobns\",\"actions\":[]}]},{\"name\":\"ujdjltymkmvg\",\"branches\":[{\"name\":\"hywartspph\",\"actions\":[]},{\"name\":\"ixkykxd\",\"actions\":[]},{\"name\":\"sj\",\"actions\":[]}]},{\"name\":\"emmucfxh\",\"branches\":[{\"name\":\"kflrmymy\",\"actions\":[]},{\"name\":\"nc\",\"actions\":[]},{\"name\":\"lhrisw\",\"actions\":[]},{\"name\":\"lmiiiovg\",\"actions\":[]}]}],\"selectors\":[{\"type\":\"ChaosTargetSelector\",\"id\":\"gxuugqkctotio\",\"filter\":{\"type\":\"ChaosTargetFilter\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"xteqdptjgwdtg\",\"filter\":{\"type\":\"ChaosTargetFilter\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"ranblwphqlkccu\",\"filter\":{\"type\":\"ChaosTargetFilter\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"ygqwahoiu\",\"filter\":{\"type\":\"ChaosTargetFilter\"}}],\"customerDataStorage\":{\"storageAccountResourceId\":\"iip\",\"blobContainerName\":\"lvawuwzdufypivls\"}},\"location\":\"jpmcub\",\"tags\":{\"ubvphavpmhbrbqgv\":\"foxx\",\"zqedikdfrdbi\":\"ovpbbttefjoknssq\",\"zcxmjpbyep\":\"mrjgeihfqlggwfi\",\"rc\":\"mgtvlj\"},\"id\":\"yfqi\",\"name\":\"gxhnpomyqwcabv\",\"type\":\"ui\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,13 +32,18 @@ public void testList() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response = manager.experiments().list(true, "rddh", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.experiments().list(false, "tgjcsgguxheml", com.azure.core.util.Context.NONE); - Assertions.assertEquals("gufhyaomtbg", response.iterator().next().location()); - Assertions.assertEquals("vgrvkffo", response.iterator().next().tags().get("jzhpjbibgjmfx")); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, response.iterator().next().identity().type()); - Assertions.assertEquals("hqxvcxgfrpdsofbs", response.iterator().next().steps().get(0).name()); - Assertions.assertEquals("nsvbuswdv", response.iterator().next().steps().get(0).branches().get(0).name()); - Assertions.assertEquals("gioilqu", response.iterator().next().selectors().get(0).id()); + Assertions.assertEquals("jpmcub", response.iterator().next().location()); + Assertions.assertEquals("foxx", response.iterator().next().tags().get("ubvphavpmhbrbqgv")); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, + response.iterator().next().identity().type()); + Assertions.assertEquals("deugf", response.iterator().next().steps().get(0).name()); + Assertions.assertEquals("zec", response.iterator().next().steps().get(0).branches().get(0).name()); + Assertions.assertEquals("gxuugqkctotio", response.iterator().next().selectors().get(0).id()); + Assertions.assertEquals("iip", response.iterator().next().customerDataStorage().storageAccountResourceId()); + Assertions.assertEquals("lvawuwzdufypivls", + response.iterator().next().customerDataStorage().blobContainerName()); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExternalResourceTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExternalResourceTests.java new file mode 100644 index 000000000000..b03aa91bafd8 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExternalResourceTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.chaos.models.ExternalResource; +import org.junit.jupiter.api.Assertions; + +public final class ExternalResourceTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ExternalResource model + = BinaryData.fromString("{\"resourceId\":\"wfansnvpdi\"}").toObject(ExternalResource.class); + Assertions.assertEquals("wfansnvpdi", model.resourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ExternalResource model = new ExternalResource().withResourceId("wfansnvpdi"); + model = BinaryData.fromObject(model).toObject(ExternalResource.class); + Assertions.assertEquals("wfansnvpdi", model.resourceId()); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/FixResourcePermissionsRequestTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/FixResourcePermissionsRequestTests.java new file mode 100644 index 000000000000..e65d0919e15f --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/FixResourcePermissionsRequestTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.chaos.models.FixResourcePermissionsRequest; +import org.junit.jupiter.api.Assertions; + +public final class FixResourcePermissionsRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + FixResourcePermissionsRequest model + = BinaryData.fromString("{\"whatIf\":true}").toObject(FixResourcePermissionsRequest.class); + Assertions.assertTrue(model.whatIf()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + FixResourcePermissionsRequest model = new FixResourcePermissionsRequest().withWhatIf(true); + model = BinaryData.fromObject(model).toObject(FixResourcePermissionsRequest.class); + Assertions.assertTrue(model.whatIf()); + } +} 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 42c12c473d5d..1298664d1eb2 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 @@ -11,7 +11,7 @@ public final class OperationDisplayTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OperationDisplay model = BinaryData.fromString( - "{\"provider\":\"gvfcj\",\"resource\":\"zoxxjtf\",\"operation\":\"luwfzitonpeqfpjk\",\"description\":\"xofpdvhpfxxypi\"}") + "{\"provider\":\"xaolth\",\"resource\":\"rgqjbpfzfsinzg\",\"operation\":\"cjrwzoxxjtfellu\",\"description\":\"zitonpeqfpjkjl\"}") .toObject(OperationDisplay.class); } } 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 c049dd714bf9..2878165f522f 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,7 +11,7 @@ public final class OperationInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OperationInner model = BinaryData.fromString( - "{\"name\":\"ffdfdosygexpa\",\"isDataAction\":true,\"display\":{\"provider\":\"msbzjhcrz\",\"resource\":\"dphlxaolt\",\"operation\":\"trg\",\"description\":\"bpf\"},\"origin\":\"user\",\"actionType\":\"Internal\"}") + "{\"name\":\"slwejdpvw\",\"isDataAction\":false,\"display\":{\"provider\":\"soacctazakl\",\"resource\":\"ahbc\",\"operation\":\"ffdfdosygexpa\",\"description\":\"akhmsbzjhcrz\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}") .toObject(OperationInner.class); } } 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 cd5d561edc79..874c480c3b05 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 @@ -12,8 +12,8 @@ public final class OperationListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OperationListResult model = BinaryData.fromString( - "{\"value\":[{\"name\":\"jbpzvgnwzsymg\",\"isDataAction\":false,\"display\":{\"provider\":\"yzkohdbihanuf\",\"resource\":\"cbjy\",\"operation\":\"git\",\"description\":\"qhabifpikxwcz\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"},{\"name\":\"q\",\"isDataAction\":false,\"display\":{\"provider\":\"y\",\"resource\":\"iwbybrkxvdumjg\",\"operation\":\"fwvuk\",\"description\":\"audccsnhs\"},\"origin\":\"user\",\"actionType\":\"Internal\"},{\"name\":\"hkryhtn\",\"isDataAction\":true,\"display\":{\"provider\":\"lokjyemkk\",\"resource\":\"ipjoxzjnchgejs\",\"operation\":\"dmailzydehojw\",\"description\":\"huxinpmqnj\"},\"origin\":\"user\",\"actionType\":\"Internal\"},{\"name\":\"sprozvcput\",\"isDataAction\":false,\"display\":{\"provider\":\"mfdatscmdvpj\",\"resource\":\"lsuuvmkjozkrwfnd\",\"operation\":\"djpslw\",\"description\":\"dpvwryoqpsoaccta\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}],\"nextLink\":\"ahbc\"}") + "{\"value\":[{\"name\":\"hfcbjysa\",\"isDataAction\":false,\"display\":{\"provider\":\"qhabifpikxwcz\",\"resource\":\"scnpqxuhivy\",\"operation\":\"iwbybrkxvdumjg\",\"description\":\"fwvuk\"},\"origin\":\"user\",\"actionType\":\"Internal\"},{\"name\":\"cs\",\"isDataAction\":false,\"display\":{\"provider\":\"nyejhkryhtnap\",\"resource\":\"wlokjyem\",\"operation\":\"vnipjox\",\"description\":\"nchgej\"},\"origin\":\"system\",\"actionType\":\"Internal\"},{\"name\":\"ilzyd\",\"isDataAction\":false,\"display\":{\"provider\":\"yahux\",\"resource\":\"pmqnja\",\"operation\":\"ixjsprozvcputeg\",\"description\":\"wmfdatscmdvpjhul\"},\"origin\":\"system\",\"actionType\":\"Internal\"}],\"nextLink\":\"jozkrwfndiod\"}") .toObject(OperationListResult.class); - Assertions.assertEquals("ahbc", model.nextLink()); + Assertions.assertEquals("jozkrwfndiod", model.nextLink()); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PermissionErrorTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PermissionErrorTests.java new file mode 100644 index 000000000000..92d4e8abd9e2 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PermissionErrorTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.chaos.models.PermissionError; + +public final class PermissionErrorTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PermissionError model = BinaryData.fromString( + "{\"resourceId\":\"ziqgfuh\",\"missingPermissions\":[\"zruswh\",\"hczznvf\"],\"requiredPermissions\":[\"cjsxjww\",\"xzv\"],\"recommendedRoles\":[\"wmxqhndvnoamlds\",\"haohdjhhflzokxc\",\"xpelnjetagltsx\",\"atftgzpnpbsw\"],\"identity\":{\"objectId\":\"floccsrmozih\",\"tenantId\":\"ipgawtxx\"}}") + .toObject(PermissionError.class); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PermissionsFixSummaryTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PermissionsFixSummaryTests.java new file mode 100644 index 000000000000..466934c63d51 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PermissionsFixSummaryTests.java @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.chaos.models.PermissionsFixSummary; + +public final class PermissionsFixSummaryTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PermissionsFixSummary model = BinaryData + .fromString( + "{\"totalRequired\":1510318129,\"succeeded\":1346038267,\"failed\":59722653,\"skipped\":167334646}") + .toObject(PermissionsFixSummary.class); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PhysicalToLogicalZoneMappingTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PhysicalToLogicalZoneMappingTests.java new file mode 100644 index 000000000000..8e57326667ee --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PhysicalToLogicalZoneMappingTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.chaos.models.PhysicalToLogicalZoneMapping; + +public final class PhysicalToLogicalZoneMappingTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PhysicalToLogicalZoneMapping model + = BinaryData.fromString("{\"physicalZone\":\"uyilflqoiquvrehm\",\"logicalZone\":\"njhvsujztc\"}") + .toObject(PhysicalToLogicalZoneMapping.class); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessInnerTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessInnerTests.java new file mode 100644 index 000000000000..eaef882b6109 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessInnerTests.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.chaos.fluent.models.PrivateAccessInner; +import com.azure.resourcemanager.chaos.models.PrivateAccessProperties; +import com.azure.resourcemanager.chaos.models.PublicNetworkAccessOption; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class PrivateAccessInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateAccessInner model = BinaryData.fromString( + "{\"properties\":{\"provisioningState\":\"Creating\",\"privateEndpointConnections\":[{\"properties\":{\"groupIds\":[\"dwbwhkszzcmrvexz\",\"vbtqgsfraoyzk\",\"owtlmnguxawqald\"],\"privateEndpoint\":{\"id\":\"uximerqfobw\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"bykutw\",\"actionsRequired\":\"hpagm\"},\"provisioningState\":\"Deleting\"},\"id\":\"dsnfdsdoakgtdl\",\"name\":\"kkze\",\"type\":\"dlhewp\"},{\"properties\":{\"groupIds\":[\"ttwvogvbbe\",\"dcngqqmoakufgmj\",\"rwr\"],\"privateEndpoint\":{\"id\":\"twaenuuzko\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"nrfdw\",\"actionsRequired\":\"uhhziuiefozbhdm\"},\"provisioningState\":\"Deleting\"},\"id\":\"zqhof\",\"name\":\"rmaequ\",\"type\":\"ah\"},{\"properties\":{\"groupIds\":[\"lfaoqzpiyylhaln\",\"whccs\",\"hka\"],\"privateEndpoint\":{\"id\":\"itqscywuggwoluhc\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"mhairsbrgzdwmsw\",\"actionsRequired\":\"pqwd\"},\"provisioningState\":\"Deleting\"},\"id\":\"cccnxqhuexmktt\",\"name\":\"stvlzywemhzrnc\",\"type\":\"dtclusiypb\"},{\"properties\":{\"groupIds\":[\"tg\",\"sl\"],\"privateEndpoint\":{\"id\":\"dcygqukyhejhz\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"fpel\",\"actionsRequired\":\"p\"},\"provisioningState\":\"Running\"},\"id\":\"r\",\"name\":\"qvujzraehtwdwrf\",\"type\":\"swibyr\"}],\"publicNetworkAccess\":\"Enabled\"},\"location\":\"h\",\"tags\":{\"c\":\"wpracstwitykhev\",\"jc\":\"edcpnmdyodnwzxl\",\"vvwxqi\":\"nhltiugcxn\"},\"id\":\"y\",\"name\":\"unyowxwl\",\"type\":\"djrkvfgbvfvpd\"}") + .toObject(PrivateAccessInner.class); + Assertions.assertEquals("h", model.location()); + Assertions.assertEquals("wpracstwitykhev", model.tags().get("c")); + Assertions.assertEquals(PublicNetworkAccessOption.ENABLED, model.properties().publicNetworkAccess()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PrivateAccessInner model = new PrivateAccessInner().withLocation("h") + .withTags(mapOf("c", "wpracstwitykhev", "jc", "edcpnmdyodnwzxl", "vvwxqi", "nhltiugcxn")) + .withProperties(new PrivateAccessProperties().withPublicNetworkAccess(PublicNetworkAccessOption.ENABLED)); + model = BinaryData.fromObject(model).toObject(PrivateAccessInner.class); + Assertions.assertEquals("h", model.location()); + Assertions.assertEquals("wpracstwitykhev", model.tags().get("c")); + Assertions.assertEquals(PublicNetworkAccessOption.ENABLED, model.properties().publicNetworkAccess()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessListResultTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessListResultTests.java new file mode 100644 index 000000000000..2282d3554ef6 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessListResultTests.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.chaos.implementation.models.PrivateAccessListResult; +import com.azure.resourcemanager.chaos.models.PublicNetworkAccessOption; +import org.junit.jupiter.api.Assertions; + +public final class PrivateAccessListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateAccessListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"provisioningState\":\"Running\",\"privateEndpointConnections\":[{\"properties\":{\"privateLinkServiceConnectionState\":{}},\"id\":\"lpqekf\",\"name\":\"nkhtjsyingw\",\"type\":\"qatmtdhtmdvy\"}],\"publicNetworkAccess\":\"Disabled\"},\"location\":\"dgszywkbirryuzh\",\"tags\":{\"nrvgoupmfiibfgg\":\"joqrvqqaatj\"},\"id\":\"ioolvrwxkvtkkgll\",\"name\":\"wjygvjayvblmhvk\",\"type\":\"uhbxvvy\"}],\"nextLink\":\"s\"}") + .toObject(PrivateAccessListResult.class); + Assertions.assertEquals("dgszywkbirryuzh", model.value().get(0).location()); + Assertions.assertEquals("joqrvqqaatj", model.value().get(0).tags().get("nrvgoupmfiibfgg")); + Assertions.assertEquals(PublicNetworkAccessOption.DISABLED, + model.value().get(0).properties().publicNetworkAccess()); + Assertions.assertEquals("s", model.nextLink()); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessPatchTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessPatchTests.java new file mode 100644 index 000000000000..0ee07181e6c0 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessPatchTests.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.chaos.models.PrivateAccessPatch; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class PrivateAccessPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateAccessPatch model + = BinaryData.fromString("{\"tags\":{\"kbwcc\":\"cr\"}}").toObject(PrivateAccessPatch.class); + Assertions.assertEquals("cr", model.tags().get("kbwcc")); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PrivateAccessPatch model = new PrivateAccessPatch().withTags(mapOf("kbwcc", "cr")); + model = BinaryData.fromObject(model).toObject(PrivateAccessPatch.class); + Assertions.assertEquals("cr", model.tags().get("kbwcc")); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessPropertiesTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessPropertiesTests.java new file mode 100644 index 000000000000..a4f40aafc4c6 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessPropertiesTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.chaos.models.PrivateAccessProperties; +import com.azure.resourcemanager.chaos.models.PublicNetworkAccessOption; +import org.junit.jupiter.api.Assertions; + +public final class PrivateAccessPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateAccessProperties model = BinaryData.fromString( + "{\"provisioningState\":\"Succeeded\",\"privateEndpointConnections\":[{\"properties\":{\"groupIds\":[\"j\"],\"privateEndpoint\":{\"id\":\"krribdeibqi\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"hvxndzwmkrefajpj\",\"actionsRequired\":\"wkqnyhg\"},\"provisioningState\":\"Succeeded\"},\"id\":\"jivfxzsjabib\",\"name\":\"ystawfsdjpvkvp\",\"type\":\"jxbkzbzkdvn\"},{\"properties\":{\"groupIds\":[\"udurgkakmokz\",\"jjklff\",\"mouwqlgzrfzeey\"],\"privateEndpoint\":{\"id\":\"zi\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"hqlbjbsybbq\",\"actionsRequired\":\"vtldgmfpgvmpip\"},\"provisioningState\":\"Succeeded\"},\"id\":\"haq\",\"name\":\"x\",\"type\":\"smwutwbdsrezpd\"},{\"properties\":{\"groupIds\":[\"uyowqkdwy\",\"i\"],\"privateEndpoint\":{\"id\":\"ircgpikpz\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"zanl\",\"actionsRequired\":\"xi\"},\"provisioningState\":\"Updating\"},\"id\":\"bzonok\",\"name\":\"xrjqcirgzpfrlazs\",\"type\":\"rnwoiindfp\"},{\"properties\":{\"groupIds\":[\"lwbtlhf\",\"sj\",\"dhszfjv\",\"bgofeljag\"],\"privateEndpoint\":{\"id\":\"qhl\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"iiojnal\",\"actionsRequired\":\"fk\"},\"provisioningState\":\"Updating\"},\"id\":\"ex\",\"name\":\"owueluqh\",\"type\":\"ahhxvrh\"}],\"publicNetworkAccess\":\"Disabled\"}") + .toObject(PrivateAccessProperties.class); + Assertions.assertEquals(PublicNetworkAccessOption.DISABLED, model.publicNetworkAccess()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PrivateAccessProperties model + = new PrivateAccessProperties().withPublicNetworkAccess(PublicNetworkAccessOption.DISABLED); + model = BinaryData.fromObject(model).toObject(PrivateAccessProperties.class); + Assertions.assertEquals(PublicNetworkAccessOption.DISABLED, model.publicNetworkAccess()); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesCreateOrUpdateMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesCreateOrUpdateMockTests.java new file mode 100644 index 000000000000..b3753ca2bdd8 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesCreateOrUpdateMockTests.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.chaos.ChaosManager; +import com.azure.resourcemanager.chaos.models.PrivateAccess; +import com.azure.resourcemanager.chaos.models.PrivateAccessProperties; +import com.azure.resourcemanager.chaos.models.PublicNetworkAccessOption; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class PrivateAccessesCreateOrUpdateMockTests { + @Test + public void testCreateOrUpdate() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpointConnections\":[{\"properties\":{\"groupIds\":[\"ustcpoq\",\"avnwqj\",\"g\",\"knlejjjkxybwfd\"],\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Succeeded\"},\"id\":\"tensvkzykj\",\"name\":\"jknsxfwu\",\"type\":\"hcdpkupnqrmgj\"},{\"properties\":{\"groupIds\":[\"uwxeoiojfizf\",\"vkjzwfbcyaykm\",\"fz\",\"bfw\"],\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Creating\"},\"id\":\"dew\",\"name\":\"rsxkr\",\"type\":\"lbjazejww\"}],\"publicNetworkAccess\":\"Enabled\"},\"location\":\"y\",\"tags\":{\"qwjhqkbiwetpozyc\":\"hbrnnhjx\",\"ledynojpz\":\"qiqyhgfsetzlexbs\",\"ljselp\":\"uwfbzkkdtnhqsy\"},\"id\":\"pbafvafhlbylc\",\"name\":\"bevxrhyzd\",\"type\":\"wrso\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ChaosManager manager = ChaosManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PrivateAccess response = manager.privateAccesses() + .define("kfaoytehq") + .withRegion("smk") + .withExistingResourceGroup("hoygzcbyfq") + .withProperties(new PrivateAccessProperties().withPublicNetworkAccess(PublicNetworkAccessOption.ENABLED)) + .withTags( + mapOf("oygbdgwumgxd", "tbbaedorvvmqf", "bgd", "dhp", "vjsaqwotm", "xjd", "xaptefhexcgjok", "wllcolsr")) + .create(); + + Assertions.assertEquals("y", response.location()); + Assertions.assertEquals("hbrnnhjx", response.tags().get("qwjhqkbiwetpozyc")); + Assertions.assertEquals(PublicNetworkAccessOption.ENABLED, response.properties().publicNetworkAccess()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesGetAPrivateEndpointConnectionWithResponseMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesGetAPrivateEndpointConnectionWithResponseMockTests.java new file mode 100644 index 000000000000..18e4d4a15e05 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesGetAPrivateEndpointConnectionWithResponseMockTests.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.chaos.ChaosManager; +import com.azure.resourcemanager.chaos.models.PrivateEndpointConnection; +import com.azure.resourcemanager.chaos.models.PrivateEndpointServiceConnectionStatus; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class PrivateAccessesGetAPrivateEndpointConnectionWithResponseMockTests { + @Test + public void testGetAPrivateEndpointConnectionWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"groupIds\":[\"kiyfjjkbajbusc\"],\"privateEndpoint\":{\"id\":\"u\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"cblevpmc\",\"actionsRequired\":\"jy\"},\"provisioningState\":\"Updating\"},\"id\":\"lzgsjgkzzlt\",\"name\":\"fhbzffovwmbjlzq\",\"type\":\"czpgvdwnapfdq\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ChaosManager manager = ChaosManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PrivateEndpointConnection response = manager.privateAccesses() + .getAPrivateEndpointConnectionWithResponse("weyurkphyjd", "ravjuq", "brxmrgch", + com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, + response.properties().privateLinkServiceConnectionState().status()); + Assertions.assertEquals("cblevpmc", response.properties().privateLinkServiceConnectionState().description()); + Assertions.assertEquals("jy", response.properties().privateLinkServiceConnectionState().actionsRequired()); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesGetByResourceGroupWithResponseMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesGetByResourceGroupWithResponseMockTests.java new file mode 100644 index 000000000000..10b34450bcec --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesGetByResourceGroupWithResponseMockTests.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.chaos.ChaosManager; +import com.azure.resourcemanager.chaos.models.PrivateAccess; +import com.azure.resourcemanager.chaos.models.PublicNetworkAccessOption; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class PrivateAccessesGetByResourceGroupWithResponseMockTests { + @Test + public void testGetByResourceGroupWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Running\",\"privateEndpointConnections\":[{\"properties\":{\"groupIds\":[\"xnafbw\",\"ro\",\"htuov\"],\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Deleting\"},\"id\":\"rjtumghih\",\"name\":\"ve\",\"type\":\"mslclblyjxlt\"}],\"publicNetworkAccess\":\"Enabled\"},\"location\":\"scvsfxigctm\",\"tags\":{\"eukdqkkyih\":\"upbezqccydrt\"},\"id\":\"tg\",\"name\":\"qm\",\"type\":\"qzgwldoychil\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ChaosManager manager = ChaosManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PrivateAccess response = manager.privateAccesses() + .getByResourceGroupWithResponse("vnynkb", "etnjuhpsprkz", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("scvsfxigctm", response.location()); + Assertions.assertEquals("upbezqccydrt", response.tags().get("eukdqkkyih")); + Assertions.assertEquals(PublicNetworkAccessOption.ENABLED, response.properties().publicNetworkAccess()); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesGetPrivateLinkResourcesWithResponseMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesGetPrivateLinkResourcesWithResponseMockTests.java new file mode 100644 index 000000000000..fd49200c3570 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesGetPrivateLinkResourcesWithResponseMockTests.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.chaos.ChaosManager; +import com.azure.resourcemanager.chaos.models.PrivateLinkResourceListResult; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class PrivateAccessesGetPrivateLinkResourcesWithResponseMockTests { + @Test + public void testGetPrivateLinkResourcesWithResponse() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"groupId\":\"ekaum\",\"requiredMembers\":[\"mbzmqk\",\"atbnxwbj\"],\"requiredZoneNames\":[\"birkfpksokdg\",\"gewi\",\"ym\",\"hbguzo\"],\"provisioningState\":\"Running\"},\"location\":\"wnf\",\"tags\":{\"ycyarnroohg\":\"hhqosmffjku\",\"ocnhzqrottjzcfyj\":\"abzoghktdpyczhco\"},\"id\":\"pt\",\"name\":\"rl\",\"type\":\"h\"},{\"properties\":{\"groupId\":\"qinfszpyglqd\",\"requiredMembers\":[\"jzralc\",\"pjby\"],\"requiredZoneNames\":[\"joqcjenkyhfqzvsq\",\"fxjelg\",\"mpzqjhhhq\",\"uwyvcacoyvi\"],\"provisioningState\":\"Creating\"},\"location\":\"zusjsz\",\"tags\":{\"vflnwyvqkxrerln\":\"cmnlzijiufehg\",\"fwxzutg\":\"ylyl\",\"yjtcdxabbujftab\":\"ztwhghmupg\"},\"id\":\"nbbklqpxzucafed\",\"name\":\"wwnlzafwxudgnh\",\"type\":\"ookrtalvnbw\"},{\"properties\":{\"groupId\":\"bemeluclvd\",\"requiredMembers\":[\"kyrdnqodx\",\"hhxhq\",\"aqnvzoqgyipemchg\",\"v\"],\"requiredZoneNames\":[\"uejdtxptlg\",\"wzhomewjjstl\"],\"provisioningState\":\"Canceled\"},\"location\":\"awmo\",\"tags\":{\"xrx\":\"ncznvodrrslblxyd\"},\"id\":\"vbxiwkgfbqlj\",\"name\":\"qkhychocok\",\"type\":\"lehu\"}],\"nextLink\":\"lrqff\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ChaosManager manager = ChaosManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PrivateLinkResourceListResult response = manager.privateAccesses() + .getPrivateLinkResourcesWithResponse("ujvaannggi", "cwkdtaaw", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("wnf", response.value().get(0).location()); + Assertions.assertEquals("hhqosmffjku", response.value().get(0).tags().get("ycyarnroohg")); + Assertions.assertEquals("birkfpksokdg", response.value().get(0).properties().requiredZoneNames().get(0)); + Assertions.assertEquals("lrqff", response.nextLink()); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesListByResourceGroupMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesListByResourceGroupMockTests.java new file mode 100644 index 000000000000..44759b9b1895 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesListByResourceGroupMockTests.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.chaos.ChaosManager; +import com.azure.resourcemanager.chaos.models.PrivateAccess; +import com.azure.resourcemanager.chaos.models.PublicNetworkAccessOption; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class PrivateAccessesListByResourceGroupMockTests { + @Test + public void testListByResourceGroup() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"privateEndpointConnections\":[{\"properties\":{\"groupIds\":[\"rweft\",\"wqejpmvsse\"],\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Creating\"},\"id\":\"a\",\"name\":\"cxtczhupeukn\",\"type\":\"jduyyespydjfb\"}],\"publicNetworkAccess\":\"Enabled\"},\"location\":\"hhulrtywikdm\",\"tags\":{\"auacdixmxufrsr\":\"kuflgbh\",\"bvjhvefgwbmqj\":\"jqgdkfnozoeo\",\"ulpzealb\":\"hntasfaymx\",\"mbtsuahxsg\":\"qkyojwyvf\"},\"id\":\"jcmmzrrscub\",\"name\":\"wsdrnpxqwodif\",\"type\":\"jxcjrmmuabwib\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ChaosManager manager = ChaosManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response = manager.privateAccesses() + .listByResourceGroup("cecfehuwaoaguh", "cqlliz", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("hhulrtywikdm", response.iterator().next().location()); + Assertions.assertEquals("kuflgbh", response.iterator().next().tags().get("auacdixmxufrsr")); + Assertions.assertEquals(PublicNetworkAccessOption.ENABLED, + response.iterator().next().properties().publicNetworkAccess()); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesListMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesListMockTests.java new file mode 100644 index 000000000000..7da59fdbd298 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesListMockTests.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.chaos.ChaosManager; +import com.azure.resourcemanager.chaos.models.PrivateAccess; +import com.azure.resourcemanager.chaos.models.PublicNetworkAccessOption; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class PrivateAccessesListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Running\",\"privateEndpointConnections\":[{\"properties\":{\"groupIds\":[\"mwineof\",\"fkak\",\"oldtvevboclzhz\",\"knyuxgvttxpn\"],\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Succeeded\"},\"id\":\"amrdixtrekidswys\",\"name\":\"br\",\"type\":\"ffg\"}],\"publicNetworkAccess\":\"Enabled\"},\"location\":\"kutvlxhrpqhv\",\"tags\":{\"bcdsziryrandoyp\":\"couqehb\",\"rmkfqlwxldykals\":\"blto\",\"olnjpnnbmjksibj\":\"g\",\"ahmrnadzyqegxyi\":\"sjjx\"},\"id\":\"pinbmhwbjijkgqxn\",\"name\":\"mbk\",\"type\":\"znj\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ChaosManager manager = ChaosManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response + = manager.privateAccesses().list("jogjonmc", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("kutvlxhrpqhv", response.iterator().next().location()); + Assertions.assertEquals("couqehb", response.iterator().next().tags().get("bcdsziryrandoyp")); + Assertions.assertEquals(PublicNetworkAccessOption.ENABLED, + response.iterator().next().properties().publicNetworkAccess()); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesListPrivateEndpointConnectionsMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesListPrivateEndpointConnectionsMockTests.java new file mode 100644 index 000000000000..c79918e65851 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesListPrivateEndpointConnectionsMockTests.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.chaos.ChaosManager; +import com.azure.resourcemanager.chaos.models.PrivateEndpointConnection; +import com.azure.resourcemanager.chaos.models.PrivateEndpointServiceConnectionStatus; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class PrivateAccessesListPrivateEndpointConnectionsMockTests { + @Test + public void testListPrivateEndpointConnections() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"groupIds\":[\"y\",\"leseyqrhvyeldo\",\"jv\"],\"privateEndpoint\":{\"id\":\"iswskuk\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"bvwispkx\",\"actionsRequired\":\"txfkndlqvt\"},\"provisioningState\":\"Canceled\"},\"id\":\"gmmbu\",\"name\":\"tywatmqaq\",\"type\":\"ueatgroe\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ChaosManager manager = ChaosManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response = manager.privateAccesses() + .listPrivateEndpointConnections("owftptnuwjtks", "h", com.azure.core.util.Context.NONE); + + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.APPROVED, + response.iterator().next().properties().privateLinkServiceConnectionState().status()); + Assertions.assertEquals("bvwispkx", + response.iterator().next().properties().privateLinkServiceConnectionState().description()); + Assertions.assertEquals("txfkndlqvt", + response.iterator().next().properties().privateLinkServiceConnectionState().actionsRequired()); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateEndpointConnectionInnerTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateEndpointConnectionInnerTests.java new file mode 100644 index 000000000000..421cd361854d --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateEndpointConnectionInnerTests.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.chaos.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.chaos.models.PrivateEndpointServiceConnectionStatus; +import org.junit.jupiter.api.Assertions; + +public final class PrivateEndpointConnectionInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateEndpointConnectionInner model = BinaryData.fromString( + "{\"properties\":{\"groupIds\":[\"g\",\"wspughftqsxhqx\",\"j\"],\"privateEndpoint\":{\"id\":\"ndxdigrjguufzdm\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"fi\",\"actionsRequired\":\"hbotzingamvppho\"},\"provisioningState\":\"Deleting\"},\"id\":\"udphqamvdkfwyn\",\"name\":\"cvtbv\",\"type\":\"ayhmtnvyqiatkz\"}") + .toObject(PrivateEndpointConnectionInner.class); + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, + model.properties().privateLinkServiceConnectionState().status()); + Assertions.assertEquals("fi", model.properties().privateLinkServiceConnectionState().description()); + Assertions.assertEquals("hbotzingamvppho", + model.properties().privateLinkServiceConnectionState().actionsRequired()); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateEndpointConnectionListResultTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateEndpointConnectionListResultTests.java new file mode 100644 index 000000000000..22e45d33cb75 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateEndpointConnectionListResultTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.chaos.implementation.models.PrivateEndpointConnectionListResult; +import com.azure.resourcemanager.chaos.models.PrivateEndpointServiceConnectionStatus; +import org.junit.jupiter.api.Assertions; + +public final class PrivateEndpointConnectionListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateEndpointConnectionListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"groupIds\":[\"jmfxumvf\",\"luyovwxnbkfezzx\",\"cy\"],\"privateEndpoint\":{\"id\":\"dgirujbzbom\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"tdcqvpniyuj\",\"actionsRequired\":\"ylwdshfssn\"},\"provisioningState\":\"Failed\"},\"id\":\"efr\",\"name\":\"msgaoj\",\"type\":\"mwn\"},{\"properties\":{\"groupIds\":[\"rfh\",\"rctym\",\"xoftpipiwyczu\"],\"privateEndpoint\":{\"id\":\"cpqjlihhyu\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"asdvl\",\"actionsRequired\":\"wdgzxulucv\"},\"provisioningState\":\"Creating\"},\"id\":\"sreuzvxurisjnh\",\"name\":\"ytxifqjzgxmrh\",\"type\":\"blwpcesutrgj\"},{\"properties\":{\"groupIds\":[\"utpwoqhihejqgw\",\"pnfqntcyp\",\"xjvfoimwksl\"],\"privateEndpoint\":{\"id\":\"izjx\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"ceacvlhvygdy\",\"actionsRequired\":\"umrtwnawjsl\"},\"provisioningState\":\"Running\"},\"id\":\"ojgcyzt\",\"name\":\"fmznba\",\"type\":\"qphchqnrnrpxehuw\"}],\"nextLink\":\"k\"}") + .toObject(PrivateEndpointConnectionListResult.class); + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, + model.value().get(0).properties().privateLinkServiceConnectionState().status()); + Assertions.assertEquals("tdcqvpniyuj", + model.value().get(0).properties().privateLinkServiceConnectionState().description()); + Assertions.assertEquals("ylwdshfssn", + model.value().get(0).properties().privateLinkServiceConnectionState().actionsRequired()); + Assertions.assertEquals("k", model.nextLink()); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateEndpointConnectionPropertiesTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateEndpointConnectionPropertiesTests.java new file mode 100644 index 000000000000..e093a0826401 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateEndpointConnectionPropertiesTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.chaos.models.PrivateEndpointConnectionProperties; +import com.azure.resourcemanager.chaos.models.PrivateEndpointServiceConnectionStatus; +import org.junit.jupiter.api.Assertions; + +public final class PrivateEndpointConnectionPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateEndpointConnectionProperties model = BinaryData.fromString( + "{\"groupIds\":[\"npwzcjaes\",\"vvsccyajguq\",\"hwyg\",\"lvdnkfx\"],\"privateEndpoint\":{\"id\":\"mdwzrmuhapfcqdps\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"psvuoymgc\",\"actionsRequired\":\"lvez\"},\"provisioningState\":\"Updating\"}") + .toObject(PrivateEndpointConnectionProperties.class); + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.APPROVED, + model.privateLinkServiceConnectionState().status()); + Assertions.assertEquals("psvuoymgc", model.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("lvez", model.privateLinkServiceConnectionState().actionsRequired()); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateEndpointTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateEndpointTests.java new file mode 100644 index 000000000000..46aa8e694f5c --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateEndpointTests.java @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.chaos.models.PrivateEndpoint; + +public final class PrivateEndpointTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateEndpoint model = BinaryData.fromString("{\"id\":\"lmfeokerq\"}").toObject(PrivateEndpoint.class); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateLinkResourceListResultInnerTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateLinkResourceListResultInnerTests.java new file mode 100644 index 000000000000..1b7eb281eed9 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateLinkResourceListResultInnerTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.chaos.fluent.models.PrivateLinkResourceListResultInner; +import org.junit.jupiter.api.Assertions; + +public final class PrivateLinkResourceListResultInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateLinkResourceListResultInner model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"groupId\":\"yrqufegxuvwz\",\"requiredMembers\":[\"hlmctlpdngitvgb\",\"hrixkwmy\",\"jejveg\"],\"requiredZoneNames\":[\"pna\",\"xexccbdreaxhcexd\",\"rvqahqkghtpwi\",\"nhyjsv\"],\"provisioningState\":\"Succeeded\"},\"location\":\"z\",\"tags\":{\"t\":\"oowvrv\",\"gfipnsxk\":\"jqppyostronzmy\"},\"id\":\"cwaekrrjre\",\"name\":\"fxtsgum\",\"type\":\"jglikkxwslolb\"},{\"properties\":{\"groupId\":\"vuzlm\",\"requiredMembers\":[\"lfktgplcrpwjxe\"],\"requiredZoneNames\":[\"igbrnjw\"],\"provisioningState\":\"Updating\"},\"location\":\"nbsazejjoqkag\",\"tags\":{\"xdtnkdmkqjjlw\":\"xttaugzxnfaaz\",\"aysjkixqtnqttez\":\"envrkpyouaibrebq\"},\"id\":\"wfff\",\"name\":\"akpjpqqmtedlt\",\"type\":\"mjihyeozphv\"},{\"properties\":{\"groupId\":\"uyqncygupkvipmd\",\"requiredMembers\":[\"xqupevzhf\"],\"requiredZoneNames\":[\"txhojujb\",\"pelmcuvhixbjxyf\",\"n\"],\"provisioningState\":\"Succeeded\"},\"location\":\"ool\",\"tags\":{\"iwkkbn\":\"p\",\"rd\":\"jrywvtylbfpnc\",\"htywubxcbihwq\":\"iwii\",\"wjchrdg\":\"nfdn\"},\"id\":\"ihxumwctondzj\",\"name\":\"uu\",\"type\":\"fdlwg\"}],\"nextLink\":\"tsbwtovvtgse\"}") + .toObject(PrivateLinkResourceListResultInner.class); + Assertions.assertEquals("z", model.value().get(0).location()); + Assertions.assertEquals("oowvrv", model.value().get(0).tags().get("t")); + Assertions.assertEquals("pna", model.value().get(0).properties().requiredZoneNames().get(0)); + Assertions.assertEquals("tsbwtovvtgse", model.nextLink()); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateLinkResourcePropertiesTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateLinkResourcePropertiesTests.java new file mode 100644 index 000000000000..8de0dbbce740 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateLinkResourcePropertiesTests.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.chaos.models.PrivateLinkResourceProperties; +import org.junit.jupiter.api.Assertions; + +public final class PrivateLinkResourcePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateLinkResourceProperties model = BinaryData.fromString( + "{\"groupId\":\"tkfa\",\"requiredMembers\":[\"pqgik\",\"zirtxdyuxzejntps\",\"wgioilqukry\",\"xtqmieoxor\"],\"requiredZoneNames\":[\"f\",\"yaomtb\",\"hhavgrvkffovjz\"],\"provisioningState\":\"Running\"}") + .toObject(PrivateLinkResourceProperties.class); + Assertions.assertEquals("f", model.requiredZoneNames().get(0)); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateLinkResourceTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateLinkResourceTests.java new file mode 100644 index 000000000000..a35714aadd2a --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateLinkResourceTests.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.chaos.models.PrivateLinkResource; +import org.junit.jupiter.api.Assertions; + +public final class PrivateLinkResourceTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateLinkResource model = BinaryData.fromString( + "{\"properties\":{\"groupId\":\"qfi\",\"requiredMembers\":[\"qknp\"],\"requiredZoneNames\":[\"nepttwqmsni\",\"fcdmqnrojlpijn\",\"rxfrddhc\"],\"provisioningState\":\"Creating\"},\"location\":\"zzronasx\",\"tags\":{\"tw\":\"ozqyzh\",\"lgnyhmo\":\"sgogczhonnxk\",\"h\":\"sxkkg\",\"hqxvcxgfrpdsofbs\":\"rghxjb\"},\"id\":\"rnsvbuswd\",\"name\":\"z\",\"type\":\"ybycnunvj\"}") + .toObject(PrivateLinkResource.class); + Assertions.assertEquals("zzronasx", model.location()); + Assertions.assertEquals("ozqyzh", model.tags().get("tw")); + Assertions.assertEquals("nepttwqmsni", model.properties().requiredZoneNames().get(0)); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateLinkServiceConnectionStateTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateLinkServiceConnectionStateTests.java new file mode 100644 index 000000000000..e41d38a0d792 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateLinkServiceConnectionStateTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.chaos.models.PrivateEndpointServiceConnectionStatus; +import com.azure.resourcemanager.chaos.models.PrivateLinkServiceConnectionState; +import org.junit.jupiter.api.Assertions; + +public final class PrivateLinkServiceConnectionStateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateLinkServiceConnectionState model = BinaryData + .fromString("{\"status\":\"Pending\",\"description\":\"kobopgxed\",\"actionsRequired\":\"wep\"}") + .toObject(PrivateLinkServiceConnectionState.class); + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, model.status()); + Assertions.assertEquals("kobopgxed", model.description()); + Assertions.assertEquals("wep", model.actionsRequired()); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/RecommendationTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/RecommendationTests.java new file mode 100644 index 000000000000..6fcd16cb3cc6 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/RecommendationTests.java @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.chaos.models.Recommendation; + +public final class RecommendationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + Recommendation model = BinaryData + .fromString( + "{\"recommendationStatus\":\"EvaluationCancelled\",\"evaluationRunAt\":\"2021-09-26T09:40:12Z\"}") + .toObject(Recommendation.class); + } +} 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 987e76385040..538a06ac65bc 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 @@ -16,19 +16,17 @@ public final class ResourceIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ResourceIdentity model = BinaryData.fromString( - "{\"principalId\":\"ocfs\",\"tenantId\":\"s\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"dvjsllrmvvdf\":{\"principalId\":\"stkiiuxhqyud\",\"clientId\":\"rrqnbpoczvyifqrv\"},\"ulexxbczwtr\":{\"principalId\":\"t\",\"clientId\":\"n\"},\"zdobpxjmflbvvnch\":{\"principalId\":\"iqzbq\",\"clientId\":\"sovmyokacspkwl\"},\"rsa\":{\"principalId\":\"cciw\",\"clientId\":\"juqk\"}}}") + "{\"principalId\":\"leggzfbu\",\"tenantId\":\"mvfaxkffeiith\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"burvjxxjnspy\":{\"principalId\":\"yvshxmz\",\"clientId\":\"bzoggigrx\"}}}") .toObject(ResourceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.type()); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.type()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ResourceIdentity model = new ResourceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities( - mapOf("dvjsllrmvvdf", new UserAssignedIdentity(), "ulexxbczwtr", new UserAssignedIdentity(), - "zdobpxjmflbvvnch", new UserAssignedIdentity(), "rsa", new UserAssignedIdentity())); + ResourceIdentity model = new ResourceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) + .withUserAssignedIdentities(mapOf("burvjxxjnspy", new UserAssignedIdentity())); model = BinaryData.fromObject(model).toObject(ResourceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.type()); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.type()); } // Use "Map.of" if available diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/RunAfterTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/RunAfterTests.java new file mode 100644 index 000000000000..03004b972625 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/RunAfterTests.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.chaos.models.ActionDependency; +import com.azure.resourcemanager.chaos.models.ActionDependencyType; +import com.azure.resourcemanager.chaos.models.ActionLifecycle; +import com.azure.resourcemanager.chaos.models.RunAfter; +import com.azure.resourcemanager.chaos.models.RunAfterBehavior; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class RunAfterTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RunAfter model = BinaryData.fromString( + "{\"behavior\":\"Any\",\"items\":[{\"type\":\"Action\",\"name\":\"cmjdmspof\",\"onActionLifecycle\":\"Skipped\"},{\"type\":\"Action\",\"name\":\"hryl\",\"onActionLifecycle\":\"Running\"},{\"type\":\"Action\",\"name\":\"rz\",\"onActionLifecycle\":\"Success\"},{\"type\":\"Action\",\"name\":\"edm\",\"onActionLifecycle\":\"Start\"}]}") + .toObject(RunAfter.class); + Assertions.assertEquals(RunAfterBehavior.ANY, model.behavior()); + Assertions.assertEquals(ActionDependencyType.ACTION, model.items().get(0).type()); + Assertions.assertEquals("cmjdmspof", model.items().get(0).name()); + Assertions.assertEquals(ActionLifecycle.SKIPPED, model.items().get(0).onActionLifecycle()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RunAfter model = new RunAfter().withBehavior(RunAfterBehavior.ANY) + .withItems(Arrays.asList( + new ActionDependency().withType(ActionDependencyType.ACTION) + .withName("cmjdmspof") + .withOnActionLifecycle(ActionLifecycle.SKIPPED), + new ActionDependency().withType(ActionDependencyType.ACTION) + .withName("hryl") + .withOnActionLifecycle(ActionLifecycle.RUNNING), + new ActionDependency().withType(ActionDependencyType.ACTION) + .withName("rz") + .withOnActionLifecycle(ActionLifecycle.SUCCESS), + new ActionDependency().withType(ActionDependencyType.ACTION) + .withName("edm") + .withOnActionLifecycle(ActionLifecycle.START))); + model = BinaryData.fromObject(model).toObject(RunAfter.class); + Assertions.assertEquals(RunAfterBehavior.ANY, model.behavior()); + Assertions.assertEquals(ActionDependencyType.ACTION, model.items().get(0).type()); + Assertions.assertEquals("cmjdmspof", model.items().get(0).name()); + Assertions.assertEquals(ActionLifecycle.SKIPPED, model.items().get(0).onActionLifecycle()); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsExecuteWithResponseMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsExecuteWithResponseMockTests.java new file mode 100644 index 000000000000..b6752f417502 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsExecuteWithResponseMockTests.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.chaos.ChaosManager; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ScenarioConfigurationsExecuteWithResponseMockTests { + @Test + public void testExecuteWithResponse() throws Exception { + String responseStr = "{}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 202, responseStr.getBytes(StandardCharsets.UTF_8))); + ChaosManager manager = ChaosManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + manager.scenarioConfigurations() + .executeWithResponse("ciatxtjrrl", "mdskjhhxdlajfoxc", "scv", "lxlhuavkrm", + com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ScenarioEvaluationResultItemTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ScenarioEvaluationResultItemTests.java new file mode 100644 index 000000000000..06fbc23c3580 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ScenarioEvaluationResultItemTests.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.chaos.models.RecommendationStatus; +import com.azure.resourcemanager.chaos.models.ScenarioEvaluationResultItem; +import org.junit.jupiter.api.Assertions; + +public final class ScenarioEvaluationResultItemTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ScenarioEvaluationResultItem model + = BinaryData.fromString("{\"scenarioName\":\"asiibmiybnnust\",\"evaluationResult\":\"NotEvaluated\"}") + .toObject(ScenarioEvaluationResultItem.class); + Assertions.assertEquals("asiibmiybnnust", model.scenarioName()); + Assertions.assertEquals(RecommendationStatus.NOT_EVALUATED, model.evaluationResult()); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ScenarioParameterTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ScenarioParameterTests.java new file mode 100644 index 000000000000..07aafbaadee0 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ScenarioParameterTests.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.chaos.models.ParameterType; +import com.azure.resourcemanager.chaos.models.ScenarioParameter; +import org.junit.jupiter.api.Assertions; + +public final class ScenarioParameterTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ScenarioParameter model = BinaryData.fromString( + "{\"name\":\"embnkbw\",\"type\":\"array\",\"default\":\"xk\",\"required\":true,\"description\":\"ihebwtsw\"}") + .toObject(ScenarioParameter.class); + Assertions.assertEquals("embnkbw", model.name()); + Assertions.assertEquals(ParameterType.ARRAY, model.type()); + Assertions.assertEquals("xk", model.defaultProperty()); + Assertions.assertTrue(model.required()); + Assertions.assertEquals("ihebwtsw", model.description()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ScenarioParameter model = new ScenarioParameter().withName("embnkbw") + .withType(ParameterType.ARRAY) + .withDefaultProperty("xk") + .withRequired(true) + .withDescription("ihebwtsw"); + model = BinaryData.fromObject(model).toObject(ScenarioParameter.class); + Assertions.assertEquals("embnkbw", model.name()); + Assertions.assertEquals(ParameterType.ARRAY, model.type()); + Assertions.assertEquals("xk", model.defaultProperty()); + Assertions.assertTrue(model.required()); + Assertions.assertEquals("ihebwtsw", model.description()); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ScenarioRunResourceTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ScenarioRunResourceTests.java new file mode 100644 index 000000000000..db6ed7e1d0c0 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ScenarioRunResourceTests.java @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.chaos.models.ScenarioRunResource; + +public final class ScenarioRunResourceTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ScenarioRunResource model = BinaryData.fromString("{\"id\":\"ze\"}").toObject(ScenarioRunResource.class); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ScenarioRunSummaryActionTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ScenarioRunSummaryActionTests.java new file mode 100644 index 000000000000..48bb5ac5f869 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ScenarioRunSummaryActionTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.chaos.models.ScenarioRunSummaryAction; + +public final class ScenarioRunSummaryActionTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ScenarioRunSummaryAction model = BinaryData.fromString( + "{\"resources\":[{\"id\":\"gnoxuztrksx\"}],\"actionUrn\":\"pndfcpfnznt\",\"state\":\"Starting\",\"startedAt\":\"2021-05-15T18:07:57Z\",\"completedAt\":\"2021-01-02T03:51:08Z\"}") + .toObject(ScenarioRunSummaryAction.class); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ScenarioRunsCancelWithResponseMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ScenarioRunsCancelWithResponseMockTests.java new file mode 100644 index 000000000000..c255924c4db8 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ScenarioRunsCancelWithResponseMockTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.chaos.ChaosManager; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ScenarioRunsCancelWithResponseMockTests { + @Test + public void testCancelWithResponse() throws Exception { + String responseStr = "{}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 202, responseStr.getBytes(StandardCharsets.UTF_8))); + ChaosManager manager = ChaosManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + manager.scenarioRuns() + .cancelWithResponse("ev", "wmseharxifvqn", "x", "mbpjptnvwjh", com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ScenariosDeleteWithResponseMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ScenariosDeleteWithResponseMockTests.java new file mode 100644 index 000000000000..5f674aedd1b9 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ScenariosDeleteWithResponseMockTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.chaos.ChaosManager; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ScenariosDeleteWithResponseMockTests { + @Test + public void testDeleteWithResponse() throws Exception { + String responseStr = "{}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ChaosManager manager = ChaosManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + manager.scenarios() + .deleteWithResponse("ofltfnnxrkadjfy", "nfmuiiiripf", "hykfkxbb", com.azure.core.util.Context.NONE); + + } +} 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 15b5dc82a9a7..dfc15db003f4 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 @@ -11,7 +11,7 @@ public final class StepStatusTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StepStatus model = BinaryData.fromString( - "{\"stepName\":\"iiswacffgdkzze\",\"stepId\":\"fvhqc\",\"status\":\"ilvpnppfuflrwd\",\"branches\":[{\"branchName\":\"xyjrxsagafcnih\",\"branchId\":\"qapnedgfbcv\",\"status\":\"vq\",\"actions\":[{\"actionName\":\"qdcvdrhvoo\",\"actionId\":\"otbobzdopcj\",\"status\":\"nhdldwmgxcx\",\"startTime\":\"2021-06-08T21:18:20Z\",\"endTime\":\"2020-12-25T22:59:09Z\",\"targets\":[{},{},{},{}]},{\"actionName\":\"uoegrpkhjwniyqs\",\"actionId\":\"i\",\"status\":\"dggkzzlvmbmpa\",\"startTime\":\"2021-04-28T10:55:20Z\",\"endTime\":\"2021-11-18T02:02:33Z\",\"targets\":[{},{},{},{}]},{\"actionName\":\"fy\",\"actionId\":\"bpfvm\",\"status\":\"hrfou\",\"startTime\":\"2021-03-05T05:10:55Z\",\"endTime\":\"2021-03-21T19:22:18Z\",\"targets\":[{}]},{\"actionName\":\"wiyzvqtmnubexkp\",\"actionId\":\"smond\",\"status\":\"quxvypomgkop\",\"startTime\":\"2021-06-11T03:04:33Z\",\"endTime\":\"2021-02-21T13:48:45Z\",\"targets\":[{},{}]}]},{\"branchName\":\"qgxy\",\"branchId\":\"ocmbqfqvmkcxoza\",\"status\":\"helxprglya\",\"actions\":[{\"actionName\":\"kcbcue\",\"actionId\":\"jxgciqibrh\",\"status\":\"xsdqrhzoymibmrqy\",\"startTime\":\"2021-02-21T21:27:59Z\",\"endTime\":\"2021-04-13T12:13:43Z\",\"targets\":[{},{},{},{}]},{\"actionName\":\"szdtmhrkwof\",\"actionId\":\"voqacpiexpbt\",\"status\":\"wbwo\",\"startTime\":\"2021-02-28T13:28:15Z\",\"endTime\":\"2021-08-15T01:33:40Z\",\"targets\":[{},{},{}]}]}]}") + "{\"stepName\":\"iohgwxrtfud\",\"stepId\":\"pxgy\",\"status\":\"gvr\",\"branches\":[{\"branchName\":\"k\",\"branchId\":\"ghimdblx\",\"status\":\"imfnjhfjx\",\"actions\":[{\"actionName\":\"kkfoqr\",\"actionId\":\"fkzikfj\",\"status\":\"n\",\"startTime\":\"2021-03-26T11:41:44Z\",\"endTime\":\"2021-04-16T02:34:29Z\",\"targets\":[{},{},{}]},{\"actionName\":\"elpcirelsfeaenwa\",\"actionId\":\"atklddxbjhwuaa\",\"status\":\"zjosp\",\"startTime\":\"2021-03-30T14:01:12Z\",\"endTime\":\"2021-10-16T17:22:18Z\",\"targets\":[{},{},{}]},{\"actionName\":\"v\",\"actionId\":\"glrvimjwosytxi\",\"status\":\"skfc\",\"startTime\":\"2021-03-03T12:07:05Z\",\"endTime\":\"2021-11-11T13:45:02Z\",\"targets\":[{},{},{},{}]}]},{\"branchName\":\"ke\",\"branchId\":\"ikh\",\"status\":\"fjhdg\",\"actions\":[{\"actionName\":\"bdunygaeqid\",\"actionId\":\"fatpxllrxcyjmoa\",\"status\":\"uvarmywdmjsjq\",\"startTime\":\"2021-07-03T14:18:15Z\",\"endTime\":\"2021-07-26T10:21:21Z\",\"targets\":[{},{}]},{\"actionName\":\"wlycoduhpkxkg\",\"actionId\":\"areqna\",\"status\":\"qugjhkycube\",\"startTime\":\"2021-03-22T14:35:21Z\",\"endTime\":\"2021-04-18T16:03:28Z\",\"targets\":[{},{},{}]},{\"actionName\":\"qmzqalkrmnjijpx\",\"actionId\":\"q\",\"status\":\"dfnbyxbaaabjyv\",\"startTime\":\"2021-10-17T00:26:42Z\",\"endTime\":\"2021-08-20T18:15:33Z\",\"targets\":[{},{},{}]}]},{\"branchName\":\"rtuzqogs\",\"branchId\":\"nevfdnw\",\"status\":\"mewzsyyc\",\"actions\":[{\"actionName\":\"oibjudpfrxtrthz\",\"actionId\":\"ytdw\",\"status\":\"brqubp\",\"startTime\":\"2021-06-19T07:52:19Z\",\"endTime\":\"2021-08-03T15:35:30Z\",\"targets\":[{}]},{\"actionName\":\"ivpdtiir\",\"actionId\":\"d\",\"status\":\"axoruzfgsquy\",\"startTime\":\"2021-03-18T06:01:03Z\",\"endTime\":\"2020-12-29T20:04:23Z\",\"targets\":[{},{}]},{\"actionName\":\"tramxjez\",\"actionId\":\"wnwxuqlcvyd\",\"status\":\"atdooaojkniod\",\"startTime\":\"2021-04-19T12:22:56Z\",\"endTime\":\"2021-09-16T01:10:50Z\",\"targets\":[{}]},{\"actionName\":\"jhemms\",\"actionId\":\"dkcrodt\",\"status\":\"nfwjlfltkacjvefk\",\"startTime\":\"2021-05-26T04:23:15Z\",\"endTime\":\"2021-04-07T03:26:36Z\",\"targets\":[{},{},{},{}]}]},{\"branchName\":\"kfpagao\",\"branchId\":\"ulpqblylsyxkqjn\",\"status\":\"ervtiagxs\",\"actions\":[{\"actionName\":\"e\",\"actionId\":\"sbzkf\",\"status\":\"eyvpnqicvinvkj\",\"startTime\":\"2021-10-15T12:56:31Z\",\"endTime\":\"2021-11-21T15:56:39Z\",\"targets\":[{},{},{},{}]},{\"actionName\":\"kzclewyh\",\"actionId\":\"wp\",\"status\":\"tzpofncckwyfzq\",\"startTime\":\"2021-07-28T19:48:05Z\",\"endTime\":\"2021-09-11T06:40:57Z\",\"targets\":[{}]},{\"actionName\":\"a\",\"actionId\":\"feqztppriol\",\"status\":\"rjaltolmncw\",\"startTime\":\"2021-10-18T01:05:02Z\",\"endTime\":\"2021-11-07T16:13:30Z\",\"targets\":[{},{},{},{}]}]}]}") .toObject(StepStatus.class); } } 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 623c86993009..17a1f779e4d8 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 @@ -6,6 +6,7 @@ import com.azure.core.util.BinaryData; import com.azure.resourcemanager.chaos.fluent.models.TargetInner; +import java.nio.charset.StandardCharsets; import java.util.HashMap; import java.util.Map; import org.junit.jupiter.api.Assertions; @@ -14,16 +15,19 @@ public final class TargetInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TargetInner model = BinaryData.fromString( - "{\"properties\":{},\"location\":\"mayhuybbkpodepoo\",\"id\":\"nuvamiheogna\",\"name\":\"xzxtheo\",\"type\":\"usivye\"}") + "{\"properties\":{\"i\":\"\\\"datafpdvhpfxxypi\\\"\",\"inuvamiheogn\":\"\\\"datamayhuybbkpodepoo\\\"\"},\"location\":\"xzxtheo\",\"id\":\"si\",\"name\":\"yevc\",\"type\":\"iqihn\"}") .toObject(TargetInner.class); - Assertions.assertEquals("mayhuybbkpodepoo", model.location()); + Assertions.assertEquals("xzxtheo", model.location()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - TargetInner model = new TargetInner().withProperties(mapOf()).withLocation("mayhuybbkpodepoo"); + TargetInner model = new TargetInner() + .withProperties(mapOf("i", BinaryData.fromBytes("\"datafpdvhpfxxypi\"".getBytes(StandardCharsets.UTF_8)), + "inuvamiheogn", BinaryData.fromBytes("\"datamayhuybbkpodepoo\"".getBytes(StandardCharsets.UTF_8)))) + .withLocation("xzxtheo"); model = BinaryData.fromObject(model).toObject(TargetInner.class); - Assertions.assertEquals("mayhuybbkpodepoo", model.location()); + Assertions.assertEquals("xzxtheo", 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 7ceedd31a599..6a6d83bdba3b 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 @@ -12,9 +12,9 @@ public final class TargetListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TargetListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{},\"location\":\"qi\",\"id\":\"hungbwjzrnf\",\"name\":\"gxg\",\"type\":\"spemvtzfk\"},{\"properties\":{},\"location\":\"bljofxqeof\",\"id\":\"e\",\"name\":\"jhqjbasvmsmjqul\",\"type\":\"gsntnbybkzgcwr\"},{\"properties\":{},\"location\":\"xxwr\",\"id\":\"douskcqvkocrcjdk\",\"name\":\"tnhxbn\",\"type\":\"biksq\"},{\"properties\":{},\"location\":\"ssainqpjwnzll\",\"id\":\"mppeebvmgxs\",\"name\":\"bkyqduu\",\"type\":\"itcjczdz\"}],\"nextLink\":\"ndhkrw\"}") + "{\"value\":[{\"properties\":{\"gxg\":\"\\\"datagbwjzrnf\\\"\",\"fublj\":\"\\\"dataspemvtzfk\\\"\"},\"location\":\"xqeofjaeqjhqjba\",\"id\":\"msmjqulngsntn\",\"name\":\"ybkzgcwr\",\"type\":\"clxxwrljdo\"}],\"nextLink\":\"kcqvkocrc\"}") .toObject(TargetListResult.class); - Assertions.assertEquals("qi", model.value().get(0).location()); - Assertions.assertEquals("ndhkrw", model.nextLink()); + Assertions.assertEquals("xqeofjaeqjhqjba", model.value().get(0).location()); + Assertions.assertEquals("kcqvkocrc", model.nextLink()); } } 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 8a82696d80bb..3c2c8ac34066 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,18 +12,18 @@ public final class TargetReferenceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - TargetReference model = BinaryData.fromString("{\"type\":\"ChaosTarget\",\"id\":\"uujqgidokgjljyo\"}") + TargetReference model = BinaryData.fromString("{\"type\":\"ChaosTarget\",\"id\":\"jhtxfvgxbfsmxne\"}") .toObject(TargetReference.class); Assertions.assertEquals(TargetReferenceType.CHAOS_TARGET, model.type()); - Assertions.assertEquals("uujqgidokgjljyo", model.id()); + Assertions.assertEquals("jhtxfvgxbfsmxne", model.id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { TargetReference model - = new TargetReference().withType(TargetReferenceType.CHAOS_TARGET).withId("uujqgidokgjljyo"); + = new TargetReference().withType(TargetReferenceType.CHAOS_TARGET).withId("jhtxfvgxbfsmxne"); model = BinaryData.fromObject(model).toObject(TargetReference.class); Assertions.assertEquals(TargetReferenceType.CHAOS_TARGET, model.type()); - Assertions.assertEquals("uujqgidokgjljyo", model.id()); + Assertions.assertEquals("jhtxfvgxbfsmxne", 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 fce1d7094b8d..f919d0a53d7b 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,7 +11,7 @@ public final class TargetTypeInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TargetTypeInner model = BinaryData.fromString( - "{\"properties\":{\"displayName\":\"tsmypyynpcdp\",\"description\":\"nzgmwznmabik\",\"propertiesSchema\":\"orgjhxbldt\",\"resourceTypes\":[\"rlkdmtncvokotl\",\"xdy\"]},\"id\":\"syocogjltdtbnnha\",\"name\":\"oocrkvcikhnv\",\"type\":\"amqgxqquezikyw\"}") + "{\"properties\":{\"displayName\":\"oxslh\",\"description\":\"hlabrq\",\"propertiesSchema\":\"kzjcjbtrgae\",\"resourceTypes\":[\"ib\"]},\"id\":\"jj\",\"name\":\"toqbeitpkxztmoob\",\"type\":\"lftidgfcwqmpim\"}") .toObject(TargetTypeInner.class); } } 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 5eb8bf0d5564..857991035f71 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 @@ -12,8 +12,8 @@ public final class TargetTypeListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TargetTypeListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"eedndrdvstkwqqtc\",\"description\":\"alm\",\"propertiesSchema\":\"tdaaygdvwvg\",\"resourceTypes\":[\"hgwxrtfudx\",\"pxgy\",\"agvrvmnpkuk\",\"himdbl\"]},\"id\":\"wi\",\"name\":\"fnjhfjxwmszkkfo\",\"type\":\"rey\"},{\"properties\":{\"displayName\":\"zi\",\"description\":\"jawneaiv\",\"propertiesSchema\":\"czelpcirel\",\"resourceTypes\":[\"aenwabf\"]},\"id\":\"kl\",\"name\":\"dxbjhwuaanozj\",\"type\":\"sphyoulpjrvxa\"},{\"properties\":{\"displayName\":\"rvimjwosytxitcsk\",\"description\":\"k\",\"propertiesSchema\":\"umiekkezzi\",\"resourceTypes\":[\"yf\"]},\"id\":\"dgqggebdu\",\"name\":\"ygaeqidbqfatpxl\",\"type\":\"rxcyjmoad\"},{\"properties\":{\"displayName\":\"varmywdmj\",\"description\":\"q\",\"propertiesSchema\":\"hhyxxrw\",\"resourceTypes\":[\"oduhp\"]},\"id\":\"kgymareqnajxqug\",\"name\":\"hky\",\"type\":\"ubeddg\"}],\"nextLink\":\"ofwq\"}") + "{\"value\":[{\"properties\":{\"displayName\":\"ltlwtjjguktalhs\",\"description\":\"kcdmxzrpoaimln\",\"propertiesSchema\":\"aaomylweazu\",\"resourceTypes\":[\"ethwwnpjhlfz\",\"wpchwahf\"]},\"id\":\"usnfepgfewet\",\"name\":\"l\",\"type\":\"xgncxyk\"},{\"properties\":{\"displayName\":\"djhlimm\",\"description\":\"x\",\"propertiesSchema\":\"bcporxvxcjzhqizx\",\"resourceTypes\":[\"tgqscjavftjuh\",\"qaz\",\"mtggu\",\"pijrajcivmmghf\"]},\"id\":\"iwrxgkn\",\"name\":\"uvyinzqodfvpgs\",\"type\":\"oxgsgbpfgzdjtx\"},{\"properties\":{\"displayName\":\"flbqvgaq\",\"description\":\"gafcqu\",\"propertiesSchema\":\"dvetnws\",\"resourceTypes\":[\"tnwlduycv\"]},\"id\":\"hyrmewipmvekdx\",\"name\":\"kuqgsjjxundxgket\",\"type\":\"zhhzjhfjmhvvmu\"}],\"nextLink\":\"pmuneqsx\"}") .toObject(TargetTypeListResult.class); - Assertions.assertEquals("ofwq", model.nextLink()); + Assertions.assertEquals("pmuneqsx", model.nextLink()); } } 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 c7db3ae86c37..284096db2152 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 @@ -11,7 +11,7 @@ public final class TargetTypePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TargetTypeProperties model = BinaryData.fromString( - "{\"displayName\":\"xkalla\",\"description\":\"elwuipi\",\"propertiesSchema\":\"jzkzi\",\"resourceTypes\":[\"vc\",\"ayrhyrnx\"]}") + "{\"displayName\":\"xzhemjyh\",\"description\":\"uj\",\"propertiesSchema\":\"t\",\"resourceTypes\":[\"zzwc\",\"lkb\",\"wpfaj\"]}") .toObject(TargetTypeProperties.class); } } 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 c5a5809467f9..66d5c97f6c57 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 @@ -20,7 +20,7 @@ public final class TargetTypesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"zdwlvwlyoupfgfb\",\"description\":\"ubdyhgk\",\"propertiesSchema\":\"in\",\"resourceTypes\":[\"wzf\",\"tsttktlahbq\",\"ctxtgzukxi\"]},\"id\":\"m\",\"name\":\"tg\",\"type\":\"qqxhrnxrxcpj\"}"; + = "{\"properties\":{\"displayName\":\"eryekzkdhmeottaw\",\"description\":\"osxw\",\"propertiesSchema\":\"nhjtf\",\"resourceTypes\":[\"dpmiljpn\"]},\"id\":\"nudqllz\",\"name\":\"auzpjlx\",\"type\":\"ehuxiqhzlraym\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); TargetType response = manager.targetTypes() - .getWithResponse("lqol", "xkcgxxlxsffgcvi", com.azure.core.util.Context.NONE) + .getWithResponse("imwrzregzgyufu", "rw", com.azure.core.util.Context.NONE) .getValue(); } 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 ab6b432951f2..3c53f3394090 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 @@ -21,7 +21,7 @@ public final class TargetTypesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"displayName\":\"zivj\",\"description\":\"rqttbajlkatnw\",\"propertiesSchema\":\"iopid\",\"resourceTypes\":[\"fku\",\"s\",\"xkdmligo\",\"ibrxkp\"]},\"id\":\"oaz\",\"name\":\"ruocbgo\",\"type\":\"rb\"}]}"; + = "{\"value\":[{\"properties\":{\"displayName\":\"w\",\"description\":\"evuafpwzyifrk\",\"propertiesSchema\":\"ltxeqip\",\"resourceTypes\":[\"dyimsfay\"]},\"id\":\"pra\",\"name\":\"kj\",\"type\":\"geslabnsmj\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,7 +31,7 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.targetTypes().list("isavok", "dzf", com.azure.core.util.Context.NONE); + = manager.targetTypes().list("zxlskihmxr", "dsajrednwyysh", com.azure.core.util.Context.NONE); } } 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 61b7f5e9b7c1..f0ee05aeae26 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 @@ -9,6 +9,7 @@ import com.azure.core.management.profile.AzureProfile; import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; +import com.azure.core.util.BinaryData; import com.azure.resourcemanager.chaos.ChaosManager; import com.azure.resourcemanager.chaos.fluent.models.TargetInner; import com.azure.resourcemanager.chaos.models.Target; @@ -24,7 +25,7 @@ public final class TargetsCreateOrUpdateWithResponseMockTests { @Test public void testCreateOrUpdateWithResponse() throws Exception { String responseStr - = "{\"properties\":{},\"location\":\"gytguslfead\",\"id\":\"gq\",\"name\":\"kyhejhzisxgf\",\"type\":\"elolppvksrpqvuj\"}"; + = "{\"properties\":{\"bvqt\":\"\\\"datavkh\\\"\",\"izjcpeog\":\"\\\"datanarfdlpukhpyrn\\\"\"},\"location\":\"nmg\",\"id\":\"ouxddbhfhpfpazj\",\"name\":\"oywjxhpdulont\",\"type\":\"cnpqwteht\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,11 +35,18 @@ public void testCreateOrUpdateWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Target response = manager.targets() - .createOrUpdateWithResponse("hka", "vwitqscyw", "ggwoluhczb", "emh", "i", - new TargetInner().withProperties(mapOf()).withLocation("rgzdwmsweyp"), com.azure.core.util.Context.NONE) + .createOrUpdateWithResponse("penuy", "bqeqqekewvnqvcd", "guaucmfdjwnla", "punj", "ikczvvitacgxmf", + new TargetInner() + .withProperties( + mapOf("soxhlwntsjgqr", BinaryData.fromBytes("\"dataserxht\"".getBytes(StandardCharsets.UTF_8)), + "nchrszizoyu", BinaryData.fromBytes("\"dataxypruuuy\"".getBytes(StandardCharsets.UTF_8)), + "g", BinaryData.fromBytes("\"datalyetndnbfqygg\"".getBytes(StandardCharsets.UTF_8)), + "trwahzj", BinaryData.fromBytes("\"datalnlg\"".getBytes(StandardCharsets.UTF_8)))) + .withLocation("cftbyrpl"), + com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("gytguslfead", response.location()); + Assertions.assertEquals("nmg", 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 5b0e1f953b54..7c36d4b6433a 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 @@ -28,7 +28,7 @@ public void testDeleteWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.targets() - .deleteWithResponse("raehtwdwrft", "wib", "rcdlbhshfwpr", "cstwity", "hevxcced", + .deleteWithResponse("evrh", "ljyoogwx", "nsduugwbsre", "rfqkfuar", "nlvhhtklnvnafvv", 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 30a8ad63e85f..aa12d7b36c3d 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 @@ -21,7 +21,7 @@ public final class TargetsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{},\"location\":\"ae\",\"id\":\"iahxicsl\",\"name\":\"aoqzpiyylhaln\",\"type\":\"whccs\"}"; + = "{\"properties\":{\"sysidfvclglxnf\":\"\\\"datajk\\\"\"},\"location\":\"jtkbusqogsfika\",\"id\":\"ansharujtjiqxfz\",\"name\":\"j\",\"type\":\"ttvwkpqh\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,9 +31,10 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Target response = manager.targets() - .getWithResponse("zkopb", "inrfdwoyu", "hziuiefozbhdms", "l", "zqhof", com.azure.core.util.Context.NONE) + .getWithResponse("razftxejwabmdujt", "vcopex", "m", "urbuhhlkyqltq", "rogtuwkf", + com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("ae", response.location()); + Assertions.assertEquals("jtkbusqogsfika", 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 42fe74044b21..d71238e9b4bd 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 @@ -22,7 +22,7 @@ public final class TargetsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{},\"location\":\"vfvpdbodaciz\",\"id\":\"q\",\"name\":\"hkr\",\"type\":\"ibdeibq\"}]}"; + = "{\"value\":[{\"properties\":{\"qecrqctmxx\":\"\\\"dataninvudbchaqdt\\\"\"},\"location\":\"ddm\",\"id\":\"huytxzvtzn\",\"name\":\"pxbannovvoxc\",\"type\":\"ytprwnwvroev\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,8 +32,8 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.targets() - .list("pnmdyodnwzxltjcv", "hlt", "ugcxnavvwxq", "byqunyow", "wlmdjrkv", com.azure.core.util.Context.NONE); + .list("yfedevjbo", "lcqxypokk", "minqcym", "zng", "bdxxe", com.azure.core.util.Context.NONE); - Assertions.assertEquals("vfvpdbodaciz", response.iterator().next().location()); + Assertions.assertEquals("ddm", 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 8c2378e756bf..cd5990a3e1be 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,9 +10,8 @@ public final class UserAssignedIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - UserAssignedIdentity model - = BinaryData.fromString("{\"principalId\":\"wkuofoskghsauu\",\"clientId\":\"jmvxie\"}") - .toObject(UserAssignedIdentity.class); + UserAssignedIdentity model = BinaryData.fromString("{\"principalId\":\"tko\",\"clientId\":\"kouknvudwtiu\"}") + .toObject(UserAssignedIdentity.class); } @org.junit.jupiter.api.Test diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspaceInnerTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspaceInnerTests.java new file mode 100644 index 000000000000..cc0dfb2eb0c2 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspaceInnerTests.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.chaos.fluent.models.WorkspaceInner; +import com.azure.resourcemanager.chaos.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.chaos.models.ResourceIdentity; +import com.azure.resourcemanager.chaos.models.UserAssignedIdentity; +import com.azure.resourcemanager.chaos.models.WorkspaceProperties; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class WorkspaceInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + WorkspaceInner model = BinaryData.fromString( + "{\"identity\":{\"principalId\":\"qhlwigdivbkbxgo\",\"tenantId\":\"ajuwas\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"imsidxasicddyvvj\":{\"principalId\":\"y\",\"clientId\":\"uxakjsqzhzbezk\"},\"qgatjeaahhvjhhn\":{\"principalId\":\"gfmo\",\"clientId\":\"ah\"}}},\"properties\":{\"provisioningState\":\"Creating\",\"communicationEndpoint\":\"bbjjidjksyxk\",\"scopes\":[\"vxevblb\",\"ednljl\",\"geuaulx\",\"nsmjbnkppxynen\"]},\"location\":\"vxei\",\"tags\":{\"ckt\":\"wklnsrmffeyc\",\"kk\":\"iymerteeammxqi\"},\"id\":\"zddrt\",\"name\":\"g\",\"type\":\"ojbmxv\"}") + .toObject(WorkspaceInner.class); + Assertions.assertEquals("vxei", model.location()); + Assertions.assertEquals("wklnsrmffeyc", model.tags().get("ckt")); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); + Assertions.assertEquals("vxevblb", model.properties().scopes().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + WorkspaceInner model = new WorkspaceInner().withLocation("vxei") + .withTags(mapOf("ckt", "wklnsrmffeyc", "kk", "iymerteeammxqi")) + .withIdentity(new ResourceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) + .withUserAssignedIdentities(mapOf("imsidxasicddyvvj", new UserAssignedIdentity(), "qgatjeaahhvjhhn", + new UserAssignedIdentity()))) + .withProperties( + new WorkspaceProperties().withScopes(Arrays.asList("vxevblb", "ednljl", "geuaulx", "nsmjbnkppxynen"))); + model = BinaryData.fromObject(model).toObject(WorkspaceInner.class); + Assertions.assertEquals("vxei", model.location()); + Assertions.assertEquals("wklnsrmffeyc", model.tags().get("ckt")); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); + Assertions.assertEquals("vxevblb", model.properties().scopes().get(0)); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspaceListResultTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspaceListResultTests.java new file mode 100644 index 000000000000..45bada44c544 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspaceListResultTests.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.chaos.implementation.models.WorkspaceListResult; +import com.azure.resourcemanager.chaos.models.ManagedServiceIdentityType; +import org.junit.jupiter.api.Assertions; + +public final class WorkspaceListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + WorkspaceListResult model = BinaryData.fromString( + "{\"value\":[{\"identity\":{\"principalId\":\"ccknfnwmbtmvp\",\"tenantId\":\"jdhttzaefedxi\",\"type\":\"None\",\"userAssignedIdentities\":{\"gtgkylkdghr\":{\"principalId\":\"hk\",\"clientId\":\"rjdqnsdfzp\"},\"fhpfeoajvgcxtx\":{\"principalId\":\"uutlwxezwzhok\",\"clientId\":\"wnhhtqlgehgppip\"},\"txfkfweg\":{\"principalId\":\"sheafid\",\"clientId\":\"ugsresmkssjhoi\"},\"wsldrizetpwbr\":{\"principalId\":\"hpt\",\"clientId\":\"lucbiqtgdqohm\"}}},\"properties\":{\"provisioningState\":\"Succeeded\",\"communicationEndpoint\":\"ibph\",\"scopes\":[\"zmizakakan\",\"jpdn\"]},\"location\":\"ha\",\"tags\":{\"opteecj\":\"lhjlmuoyxprimr\",\"zaum\":\"eislstvasylwx\"},\"id\":\"eoohguufuzboyj\",\"name\":\"thwtzol\",\"type\":\"a\"},{\"identity\":{\"principalId\":\"m\",\"tenantId\":\"mebwjscjpah\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"qcttadijaeukmrsi\":{\"principalId\":\"bfqxnmwmqtibxyi\",\"clientId\":\"dt\"},\"dqmeqwigpibudq\":{\"principalId\":\"kpn\",\"clientId\":\"aapm\"}}},\"properties\":{\"provisioningState\":\"Succeeded\",\"communicationEndpoint\":\"beybpmzznrtffyaq\",\"scopes\":[\"mhh\",\"ioqaqhvs\",\"ufuqyrx\"]},\"location\":\"lcgqlsismj\",\"tags\":{\"ju\":\"ddgamquhiosr\",\"zhczexrxzbujrtrh\":\"vfcdisyirn\"},\"id\":\"vwrevkhgnlnzon\",\"name\":\"lrpiqywnc\",\"type\":\"jtszcof\"},{\"identity\":{\"principalId\":\"htd\",\"tenantId\":\"bjkvreljeamu\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"jerbdkelvidizozs\":{\"principalId\":\"ov\",\"clientId\":\"nashcxlp\"},\"uqj\":{\"principalId\":\"ccxjm\",\"clientId\":\"fdgnwncypuuwwlt\"},\"chxgs\":{\"principalId\":\"zenkeifzzhmkd\",\"clientId\":\"vflyhbxcu\"},\"vacqpbtuodxesz\":{\"principalId\":\"oldforobw\",\"clientId\":\"vizbfhfo\"}}},\"properties\":{\"provisioningState\":\"Deleting\",\"communicationEndpoint\":\"l\",\"scopes\":[\"umuaslzkwrrwoycq\",\"cwyhahno\",\"drkywuhps\"]},\"location\":\"uurutlwexxwlalni\",\"tags\":{\"gdakchz\":\"srzpgepqtybbww\",\"xqnrkcxk\":\"vl\",\"mysu\":\"ibn\"},\"id\":\"swqrntvlwijp\",\"name\":\"ttexoqqpwcyyufmh\",\"type\":\"uncuw\"},{\"identity\":{\"principalId\":\"pkcdqzhlct\",\"tenantId\":\"unqndyfpchrqb\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"r\":{\"principalId\":\"gegydcwboxjum\",\"clientId\":\"qoli\"},\"rzpasccbiuimzdly\":{\"principalId\":\"iouaubrjt\",\"clientId\":\"qxfuojrngif\"},\"pctf\":{\"principalId\":\"fqwmkyoquf\",\"clientId\":\"ruzslzoj\"},\"i\":{\"principalId\":\"dxotng\",\"clientId\":\"gugey\"}}},\"properties\":{\"provisioningState\":\"Running\",\"communicationEndpoint\":\"yui\",\"scopes\":[\"bsnmfpph\",\"jee\"]},\"location\":\"hyhsgzfczbg\",\"tags\":{\"i\":\"gbeglqgleo\",\"eebtijvacvb\":\"etnluankrrfx\"},\"id\":\"qzbqqxlajrnwxa\",\"name\":\"evehjkuyxoaf\",\"type\":\"aoqltfaey\"}],\"nextLink\":\"nm\"}") + .toObject(WorkspaceListResult.class); + Assertions.assertEquals("ha", model.value().get(0).location()); + Assertions.assertEquals("lhjlmuoyxprimr", model.value().get(0).tags().get("opteecj")); + Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.value().get(0).identity().type()); + Assertions.assertEquals("zmizakakan", model.value().get(0).properties().scopes().get(0)); + Assertions.assertEquals("nm", model.nextLink()); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspacePropertiesTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspacePropertiesTests.java new file mode 100644 index 000000000000..3c00dc0ca2d7 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspacePropertiesTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.chaos.models.WorkspaceProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class WorkspacePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + WorkspaceProperties model = BinaryData.fromString( + "{\"provisioningState\":\"Succeeded\",\"communicationEndpoint\":\"fdeesvecuijpxtx\",\"scopes\":[\"wprtu\",\"wsawddjibabxvi\",\"itvtzeexavo\"]}") + .toObject(WorkspaceProperties.class); + Assertions.assertEquals("wprtu", model.scopes().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + WorkspaceProperties model + = new WorkspaceProperties().withScopes(Arrays.asList("wprtu", "wsawddjibabxvi", "itvtzeexavo")); + model = BinaryData.fromObject(model).toObject(WorkspaceProperties.class); + Assertions.assertEquals("wprtu", model.scopes().get(0)); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspaceUpdateTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspaceUpdateTests.java new file mode 100644 index 000000000000..959174535a37 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspaceUpdateTests.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.chaos.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.chaos.models.ResourceIdentity; +import com.azure.resourcemanager.chaos.models.UserAssignedIdentity; +import com.azure.resourcemanager.chaos.models.WorkspaceUpdate; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class WorkspaceUpdateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + WorkspaceUpdate model = BinaryData.fromString( + "{\"tags\":{\"gsfjac\":\"glecdmdqbwpypq\",\"d\":\"slhhxudbxv\",\"ud\":\"tnsi\"},\"identity\":{\"principalId\":\"mes\",\"tenantId\":\"dlpagzrcxfail\",\"type\":\"None\",\"userAssignedIdentities\":{\"cc\":{\"principalId\":\"dboxdfgsftufqobr\",\"clientId\":\"nac\"},\"tnrzvuljra\":{\"principalId\":\"nhxk\",\"clientId\":\"v\"},\"a\":{\"principalId\":\"rano\",\"clientId\":\"gukkjqnvbroy\"},\"rwhryvycytd\":{\"principalId\":\"ulcdisdosf\",\"clientId\":\"jsvg\"}}}}") + .toObject(WorkspaceUpdate.class); + Assertions.assertEquals("glecdmdqbwpypq", model.tags().get("gsfjac")); + Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.identity().type()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + WorkspaceUpdate model + = new WorkspaceUpdate().withTags(mapOf("gsfjac", "glecdmdqbwpypq", "d", "slhhxudbxv", "ud", "tnsi")) + .withIdentity(new ResourceIdentity().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities( + mapOf("cc", new UserAssignedIdentity(), "tnrzvuljra", new UserAssignedIdentity(), "a", + new UserAssignedIdentity(), "rwhryvycytd", new UserAssignedIdentity()))); + model = BinaryData.fromObject(model).toObject(WorkspaceUpdate.class); + Assertions.assertEquals("glecdmdqbwpypq", model.tags().get("gsfjac")); + Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.identity().type()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspacesCreateOrUpdateMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspacesCreateOrUpdateMockTests.java new file mode 100644 index 000000000000..f557a692b4b2 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspacesCreateOrUpdateMockTests.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.chaos.ChaosManager; +import com.azure.resourcemanager.chaos.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.chaos.models.ResourceIdentity; +import com.azure.resourcemanager.chaos.models.UserAssignedIdentity; +import com.azure.resourcemanager.chaos.models.Workspace; +import com.azure.resourcemanager.chaos.models.WorkspaceProperties; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class WorkspacesCreateOrUpdateMockTests { + @Test + public void testCreateOrUpdate() throws Exception { + String responseStr + = "{\"identity\":{\"principalId\":\"cpwzv\",\"tenantId\":\"oksqdt\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"nepubdpkxyqvgx\":{\"principalId\":\"lboncqbazqicqc\",\"clientId\":\"gtvxbyj\"},\"ifmcwnosbzlehg\":{\"principalId\":\"od\",\"clientId\":\"vohkxdxuws\"},\"lszerqzevx\":{\"principalId\":\"kb\",\"clientId\":\"njolgjyyxpv\"},\"afjrqpjiyrqjcrg\":{\"principalId\":\"eintxwaljglzobl\",\"clientId\":\"aafrqulhmzyqbhd\"}}},\"properties\":{\"provisioningState\":\"Succeeded\",\"communicationEndpoint\":\"z\",\"scopes\":[\"fkb\",\"rzorp\",\"ltbqctqjfgxxsaet\",\"zdgvpyigdaqqilz\"]},\"location\":\"d\",\"tags\":{\"gilfjqqacdmkxw\":\"oedxngucaifpaurw\",\"z\":\"dcvjwc\"},\"id\":\"akeciqchx\",\"name\":\"tuicds\",\"type\":\"wdfmmpzhzzwvywr\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ChaosManager manager = ChaosManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + Workspace response = manager.workspaces() + .define("lbnwtpcpahp") + .withRegion("nbagnchj") + .withExistingResourceGroup("atvlmbjwcolbm") + .withProperties( + new WorkspaceProperties().withScopes(Arrays.asList("ikxkxhneg", "njzrbhtmeplvu", "aobrlbp"))) + .withTags(mapOf("xcgqtagdrclsso", "muowakywalhjy", "gjco", "jomevtfycnlb", "ji", "kk")) + .withIdentity(new ResourceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf("o", new UserAssignedIdentity()))) + .create(); + + Assertions.assertEquals("d", response.location()); + Assertions.assertEquals("oedxngucaifpaurw", response.tags().get("gilfjqqacdmkxw")); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, response.identity().type()); + Assertions.assertEquals("fkb", response.properties().scopes().get(0)); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspacesGetByResourceGroupWithResponseMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspacesGetByResourceGroupWithResponseMockTests.java new file mode 100644 index 000000000000..87550df79756 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspacesGetByResourceGroupWithResponseMockTests.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.chaos.ChaosManager; +import com.azure.resourcemanager.chaos.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.chaos.models.Workspace; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class WorkspacesGetByResourceGroupWithResponseMockTests { + @Test + public void testGetByResourceGroupWithResponse() throws Exception { + String responseStr + = "{\"identity\":{\"principalId\":\"rcssbzhddubbnq\",\"tenantId\":\"lhkalehpavawugi\",\"type\":\"None\",\"userAssignedIdentities\":{\"tp\":{\"principalId\":\"gqgdminictteajoh\",\"clientId\":\"gspnbonhpczykm\"},\"zulo\":{\"principalId\":\"xqcsehch\",\"clientId\":\"ufmpqumqyjgy\"},\"jclid\":{\"principalId\":\"aeuzanh\",\"clientId\":\"nhsenwphpzfng\"},\"fwbeqrkuorh\":{\"principalId\":\"u\",\"clientId\":\"jj\"}}},\"properties\":{\"provisioningState\":\"Failed\",\"communicationEndpoint\":\"uqnmdvhazcvj\",\"scopes\":[\"iqswbqer\"]},\"location\":\"xiytxtdgukvl\",\"tags\":{\"reswmowegmmut\":\"tgdstyouambe\"},\"id\":\"yxey\",\"name\":\"uqi\",\"type\":\"ijiitns\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ChaosManager manager = ChaosManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + Workspace response = manager.workspaces() + .getByResourceGroupWithResponse("wagltbxoeeonqlnf", "myymvqdbpbhfckdv", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("xiytxtdgukvl", response.location()); + Assertions.assertEquals("tgdstyouambe", response.tags().get("reswmowegmmut")); + Assertions.assertEquals(ManagedServiceIdentityType.NONE, response.identity().type()); + Assertions.assertEquals("iqswbqer", response.properties().scopes().get(0)); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspacesListByResourceGroupMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspacesListByResourceGroupMockTests.java new file mode 100644 index 000000000000..7b6519ca39c7 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspacesListByResourceGroupMockTests.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.chaos.ChaosManager; +import com.azure.resourcemanager.chaos.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.chaos.models.Workspace; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class WorkspacesListByResourceGroupMockTests { + @Test + public void testListByResourceGroup() throws Exception { + String responseStr + = "{\"value\":[{\"identity\":{\"principalId\":\"eqfrojs\",\"tenantId\":\"grhydk\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"ygzmxieqvdsmak\":{\"principalId\":\"zsk\",\"clientId\":\"ca\"},\"ybxawoijpodtblx\":{\"principalId\":\"xq\",\"clientId\":\"hyhxa\"}}},\"properties\":{\"provisioningState\":\"Creating\",\"communicationEndpoint\":\"j\",\"scopes\":[\"odqhyk\",\"ncn\",\"emehllizh\"]},\"location\":\"umoqodkad\",\"tags\":{\"xwhydtluvv\":\"ibngqladyw\",\"zsn\":\"ds\",\"y\":\"yemlowuowhlxln\",\"mo\":\"mouvbl\"},\"id\":\"zkltrfowtdvrfmv\",\"name\":\"ih\",\"type\":\"vjdrqcrjidhftuk\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ChaosManager manager = ChaosManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response + = manager.workspaces().listByResourceGroup("xlzdesygrijwa", "ufanray", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("umoqodkad", response.iterator().next().location()); + Assertions.assertEquals("ibngqladyw", response.iterator().next().tags().get("xwhydtluvv")); + Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, response.iterator().next().identity().type()); + Assertions.assertEquals("odqhyk", response.iterator().next().properties().scopes().get(0)); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspacesListMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspacesListMockTests.java new file mode 100644 index 000000000000..77a8fb7faa2d --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspacesListMockTests.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.chaos.ChaosManager; +import com.azure.resourcemanager.chaos.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.chaos.models.Workspace; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class WorkspacesListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"identity\":{\"principalId\":\"bfqz\",\"tenantId\":\"fnjyix\",\"type\":\"None\",\"userAssignedIdentities\":{\"fxonjtpusllywp\":{\"principalId\":\"tqxmbj\",\"clientId\":\"umzznvalqjrhuz\"},\"uygdjboqgr\":{\"principalId\":\"iotzbpdbollgryfq\",\"clientId\":\"asigrowsocne\"},\"kxiidisczskoswo\":{\"principalId\":\"qjkqevadrmmwi\",\"clientId\":\"wvcmj\"}}},\"properties\":{\"provisioningState\":\"Updating\",\"communicationEndpoint\":\"zugamxzkrrcoiis\",\"scopes\":[\"mnppccekuztd\",\"bezaxyfukzxuiz\"]},\"location\":\"hnepkpeti\",\"tags\":{\"v\":\"qiubxdukecpxda\",\"dblnsntrp\":\"hctmmkosz\",\"fmhklbnld\":\"aqkiofkb\",\"hez\":\"vcb\"},\"id\":\"quwusq\",\"name\":\"utrpbr\",\"type\":\"uyu\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + ChaosManager manager = ChaosManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response = manager.workspaces().list("hdxlw", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("hnepkpeti", response.iterator().next().location()); + Assertions.assertEquals("qiubxdukecpxda", response.iterator().next().tags().get("v")); + Assertions.assertEquals(ManagedServiceIdentityType.NONE, response.iterator().next().identity().type()); + Assertions.assertEquals("mnppccekuztd", response.iterator().next().properties().scopes().get(0)); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ZoneResolutionInfoTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ZoneResolutionInfoTests.java new file mode 100644 index 000000000000..deaec426a5f6 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ZoneResolutionInfoTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.chaos.models.ZoneResolutionInfo; + +public final class ZoneResolutionInfoTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ZoneResolutionInfo model = BinaryData.fromString( + "{\"mode\":\"logical\",\"requestedPhysicalZones\":[\"srxuzvoam\",\"tcqiosmg\",\"zah\"],\"subscriptionZoneMappings\":[{\"subscriptionId\":\"qdlyrtl\",\"zoneMappings\":[{\"physicalZone\":\"ap\",\"logicalZone\":\"ltzkatbhjmznnb\"},{\"physicalZone\":\"oqeq\",\"logicalZone\":\"larvlagunbtg\"}]},{\"subscriptionId\":\"ebwlnbmhyreeudzq\",\"zoneMappings\":[{\"physicalZone\":\"bpdqmjxlyy\",\"logicalZone\":\"glgou\"},{\"physicalZone\":\"tlmj\",\"logicalZone\":\"yuojqtobaxk\"},{\"physicalZone\":\"eytu\",\"logicalZone\":\"lbfjkwr\"},{\"physicalZone\":\"snkq\",\"logicalZone\":\"hsyrqunj\"}]},{\"subscriptionId\":\"hdenxaulk\",\"zoneMappings\":[{\"physicalZone\":\"kdk\",\"logicalZone\":\"fmjnnawtqa\"},{\"physicalZone\":\"pxuckpggq\",\"logicalZone\":\"wey\"},{\"physicalZone\":\"rdhlis\",\"logicalZone\":\"gwflq\"},{\"physicalZone\":\"mpizru\",\"logicalZone\":\"n\"}]},{\"subscriptionId\":\"qxpxiwfcngjsaa\",\"zoneMappings\":[{\"physicalZone\":\"ixtmkzjvkviirhgf\",\"logicalZone\":\"rwsdp\"},{\"physicalZone\":\"ra\",\"logicalZone\":\"zvzbglbyv\"}]}]}") + .toObject(ZoneResolutionInfo.class); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ZoneResolutionMappingTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ZoneResolutionMappingTests.java new file mode 100644 index 000000000000..ed0caf6efdc1 --- /dev/null +++ b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ZoneResolutionMappingTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.chaos.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.chaos.models.ZoneResolutionMapping; + +public final class ZoneResolutionMappingTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ZoneResolutionMapping model = BinaryData.fromString( + "{\"subscriptionId\":\"ctctbrxkjz\",\"zoneMappings\":[{\"physicalZone\":\"gxffmshkwf\",\"logicalZone\":\"kgozxwop\"},{\"physicalZone\":\"bydpizqaclnapxb\",\"logicalZone\":\"yg\"},{\"physicalZone\":\"ugjknf\",\"logicalZone\":\"mfcttux\"}]}") + .toObject(ZoneResolutionMapping.class); + } +} diff --git a/sdk/chaos/azure-resourcemanager-chaos/tsp-location.yaml b/sdk/chaos/azure-resourcemanager-chaos/tsp-location.yaml index c9ac7f6a502d..fd4d4340510d 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/tsp-location.yaml +++ b/sdk/chaos/azure-resourcemanager-chaos/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/chaos/resource-manager/Microsoft.Chaos/Chaos -commit: efa49a123da7ce3ffe093a13832258305f529711 +commit: 84d40416fbb3d2416cb7abe7ec82e63c76832963 repo: Azure/azure-rest-api-specs additionalDirectories: From f23cc43f6d9998f445ed84afc3a256464249da4b Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Wed, 6 May 2026 14:37:24 +0000 Subject: [PATCH 2/3] Configurations: 'specification/chaos/resource-manager/Microsoft.Chaos/Chaos/tspconfig.yaml', API Version: 2026-05-01-preview, SDK Release Type: beta, and CommitSHA: '84d40416fbb3d2416cb7abe7ec82e63c76832963' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6258211 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. --- sdk/chaos/azure-resourcemanager-chaos/CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk/chaos/azure-resourcemanager-chaos/CHANGELOG.md b/sdk/chaos/azure-resourcemanager-chaos/CHANGELOG.md index 2148954702f4..81ddcc6f1fbf 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/CHANGELOG.md +++ b/sdk/chaos/azure-resourcemanager-chaos/CHANGELOG.md @@ -335,13 +335,13 @@ #### `ChaosManager` was modified * `scenarioConfigurations()` was added -* `actionVersions()` was added * `discoveredResources()` was added +* `scenarioRuns()` was added +* `actionVersions()` was added +* `scenarios()` was added * `privateAccesses()` was added * `actions()` was added -* `scenarios()` was added * `workspaces()` was added -* `scenarioRuns()` was added ## 1.3.0 (2025-05-15) From 72d6d1c06bdea37bfc3fad151f675f795a89449e Mon Sep 17 00:00:00 2001 From: Renzo Pretto Date: Wed, 6 May 2026 13:01:14 -0400 Subject: [PATCH 3/3] Regenerate chaos Java SDK with tsp-client update Run tsp-client update and codesnippet:update-codesnippet to regenerate the Java SDK code for the chaos service to match the latest TypeSpec definition. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../azure-resourcemanager-chaos/CHANGELOG.md | 1 + .../azure-resourcemanager-chaos/README.md | 2 +- .../azure-resourcemanager-chaos/SAMPLE.md | 1269 +----------- sdk/chaos/azure-resourcemanager-chaos/pom.xml | 2 +- .../resourcemanager/chaos/ChaosManager.java | 129 -- .../chaos/fluent/ActionVersionsClient.java | 78 - .../chaos/fluent/ActionsClient.java | 70 - .../chaos/fluent/ChaosManagementClient.java | 56 - .../fluent/DiscoveredResourcesClient.java | 75 - .../chaos/fluent/PrivateAccessesClient.java | 447 ---- .../fluent/ScenarioConfigurationsClient.java | 388 ---- .../chaos/fluent/ScenarioRunsClient.java | 111 - .../chaos/fluent/ScenariosClient.java | 136 -- .../chaos/fluent/WorkspacesClient.java | 328 --- .../chaos/fluent/models/ActionInner.java | 228 -- .../chaos/fluent/models/ActionProperties.java | 208 -- .../fluent/models/ActionVersionInner.java | 228 -- .../chaos/fluent/models/CapabilityInner.java | 11 - .../fluent/models/CapabilityProperties.java | 19 - .../models/DiscoveredResourceInner.java | 144 -- .../ExperimentExecutionDetailsInner.java | 10 - .../ExperimentExecutionDetailsProperties.java | 18 - .../models/ExperimentExecutionInner.java | 10 - .../models/ExperimentExecutionProperties.java | 18 - .../chaos/fluent/models/ExperimentInner.java | 26 - .../fluent/models/ExperimentProperties.java | 32 - .../fluent/models/PrivateAccessInner.java | 181 -- .../PrivateEndpointConnectionInner.java | 146 -- .../PrivateLinkResourceListResultInner.java | 97 - .../models/ScenarioConfigurationInner.java | 156 -- .../chaos/fluent/models/ScenarioInner.java | 155 -- .../chaos/fluent/models/ScenarioRunInner.java | 144 -- .../chaos/fluent/models/WorkspaceInner.java | 210 -- .../chaos/implementation/ActionImpl.java | 95 - .../implementation/ActionVersionImpl.java | 95 - .../ActionVersionsClientImpl.java | 388 ---- .../implementation/ActionVersionsImpl.java | 66 - .../implementation/ActionsClientImpl.java | 363 ---- .../chaos/implementation/ActionsImpl.java | 61 - .../chaos/implementation/CapabilityImpl.java | 5 - .../ChaosManagementClientImpl.java | 130 +- .../DiscoveredResourceImpl.java | 50 - .../DiscoveredResourcesClientImpl.java | 366 ---- .../DiscoveredResourcesImpl.java | 68 - .../ExperimentExecutionDetailsImpl.java | 5 - .../ExperimentExecutionImpl.java | 5 - .../chaos/implementation/ExperimentImpl.java | 10 - .../implementation/PrivateAccessImpl.java | 176 -- .../PrivateAccessesClientImpl.java | 1830 ----------------- .../implementation/PrivateAccessesImpl.java | 213 -- .../PrivateEndpointConnectionImpl.java | 50 - .../PrivateLinkResourceListResultImpl.java | 44 - .../ScenarioConfigurationImpl.java | 174 -- .../ScenarioConfigurationsClientImpl.java | 1410 ------------- .../ScenarioConfigurationsImpl.java | 221 -- .../chaos/implementation/ScenarioImpl.java | 132 -- .../chaos/implementation/ScenarioRunImpl.java | 49 - .../ScenarioRunsClientImpl.java | 471 ----- .../implementation/ScenarioRunsImpl.java | 82 - .../implementation/ScenariosClientImpl.java | 551 ----- .../chaos/implementation/ScenariosImpl.java | 152 -- .../chaos/implementation/WorkspaceImpl.java | 200 -- .../implementation/WorkspacesClientImpl.java | 1322 ------------ .../chaos/implementation/WorkspacesImpl.java | 152 -- .../models/ActionListResult.java | 95 - .../models/ActionVersionListResult.java | 95 - .../models/DiscoveredResourceListResult.java | 96 - .../models/PrivateAccessListResult.java | 95 - .../PrivateEndpointConnectionListResult.java | 98 - .../ScenarioConfigurationListResult.java | 97 - .../models/ScenarioListResult.java | 95 - .../models/ScenarioRunListResult.java | 95 - .../models/WorkspaceListResult.java | 95 - .../resourcemanager/chaos/models/Action.java | 112 - .../chaos/models/ActionDependency.java | 145 -- .../chaos/models/ActionDependencyType.java | 46 - .../chaos/models/ActionKind.java | 56 - .../chaos/models/ActionLifecycle.java | 71 - .../ActionPropertiesParametersSchema.java | 56 - .../models/ActionSupportedTargetType.java | 94 - .../chaos/models/ActionVersion.java | 112 - .../chaos/models/ActionVersions.java | 69 - .../resourcemanager/chaos/models/Actions.java | 63 - .../chaos/models/Capability.java | 8 - .../chaos/models/ConfigurationExclusions.java | 146 -- .../chaos/models/ConfigurationFilters.java | 203 -- .../models/CustomerDataStorageProperties.java | 116 -- .../chaos/models/DiscoveredResource.java | 55 - .../models/DiscoveredResourceProperties.java | 157 -- .../chaos/models/DiscoveredResources.java | 67 - .../chaos/models/EntraIdentity.java | 90 - .../chaos/models/Experiment.java | 26 +- .../chaos/models/ExperimentExecution.java | 7 - .../models/ExperimentExecutionDetails.java | 7 - .../chaos/models/ExternalResource.java | 85 - .../models/FixResourcePermissionsRequest.java | 86 - .../chaos/models/OperationError.java | 92 - .../chaos/models/ParameterType.java | 66 - .../chaos/models/PermissionError.java | 142 -- .../chaos/models/PermissionsFix.java | 143 -- .../models/PermissionsFixProperties.java | 161 -- .../chaos/models/PermissionsFixState.java | 71 - .../chaos/models/PermissionsFixSummary.java | 122 -- .../models/PhysicalToLogicalZoneMapping.java | 92 - .../chaos/models/PrivateAccess.java | 252 --- .../chaos/models/PrivateAccessPatch.java | 87 - .../chaos/models/PrivateAccessProperties.java | 125 -- .../chaos/models/PrivateAccesses.java | 283 --- .../chaos/models/PrivateEndpoint.java | 73 - .../models/PrivateEndpointConnection.java | 55 - .../PrivateEndpointConnectionProperties.java | 131 -- ...rivateEndpointServiceConnectionStatus.java | 57 - .../chaos/models/PrivateLinkResource.java | 151 -- .../models/PrivateLinkResourceListResult.java | 34 - .../models/PrivateLinkResourceProperties.java | 128 -- .../PrivateLinkServiceConnectionState.java | 112 - .../chaos/models/ProvisioningState.java | 5 - .../models/PublicNetworkAccessOption.java | 51 - .../chaos/models/Recommendation.java | 94 - .../chaos/models/RecommendationStatus.java | 71 - .../chaos/models/ResourceStateError.java | 122 -- .../chaos/models/RoleAssignmentError.java | 90 - .../chaos/models/RoleAssignmentResult.java | 186 -- .../chaos/models/RoleAssignmentStatus.java | 61 - .../chaos/models/RunAfter.java | 116 -- .../chaos/models/RunAfterBehavior.java | 56 - .../chaos/models/Scenario.java | 189 -- .../chaos/models/ScenarioAction.java | 317 --- .../chaos/models/ScenarioConfiguration.java | 250 --- .../ScenarioConfigurationProperties.java | 194 -- .../chaos/models/ScenarioConfigurations.java | 245 --- .../ScenarioConfigurationsExecuteHeaders.java | 59 - ...ScenarioConfigurationsExecuteResponse.java | 29 - .../chaos/models/ScenarioErrors.java | 128 -- .../models/ScenarioEvaluationResultItem.java | 94 - .../chaos/models/ScenarioParameter.java | 198 -- .../chaos/models/ScenarioProperties.java | 210 -- .../chaos/models/ScenarioRun.java | 55 - .../chaos/models/ScenarioRunProperties.java | 280 --- .../chaos/models/ScenarioRunResource.java | 74 - .../chaos/models/ScenarioRunState.java | 106 - .../models/ScenarioRunSummaryAction.java | 145 -- .../chaos/models/ScenarioRuns.java | 101 - .../models/ScenarioRunsCancelHeaders.java | 59 - .../models/ScenarioRunsCancelResponse.java | 28 - .../chaos/models/ScenarioRunsGetHeaders.java | 59 - .../chaos/models/ScenarioRunsGetResponse.java | 39 - .../chaos/models/ScenarioSummaryState.java | 91 - .../chaos/models/ScenarioValidationState.java | 83 - .../chaos/models/Scenarios.java | 147 -- .../chaos/models/Validation.java | 143 -- .../chaos/models/ValidationProperties.java | 163 -- .../chaos/models/Workspace.java | 305 --- .../chaos/models/WorkspaceEvaluation.java | 143 -- .../models/WorkspaceEvaluationProperties.java | 249 --- .../models/WorkspaceEvaluationStatus.java | 76 - .../chaos/models/WorkspaceProperties.java | 122 -- .../chaos/models/WorkspaceUpdate.java | 115 -- .../chaos/models/Workspaces.java | 184 -- .../chaos/models/ZoneResolutionInfo.java | 126 -- .../chaos/models/ZoneResolutionMapping.java | 93 - .../chaos/models/ZoneResolutionMode.java | 52 - .../azure-resourcemanager-chaos_metadata.json | 2 +- .../proxy-config.json | 2 +- .../generated/ActionVersionsGetSamples.java | 23 - .../generated/ActionVersionsListSamples.java | 22 - .../chaos/generated/ActionsGetSamples.java | 22 - .../chaos/generated/ActionsListSamples.java | 22 - .../CapabilitiesCreateOrUpdateSamples.java | 2 +- .../generated/CapabilitiesDeleteSamples.java | 2 +- .../generated/CapabilitiesGetSamples.java | 2 +- .../generated/CapabilitiesListSamples.java | 2 +- .../generated/CapabilityTypesGetSamples.java | 2 +- .../generated/CapabilityTypesListSamples.java | 2 +- .../DiscoveredResourcesGetSamples.java | 24 - ...overedResourcesListByWorkspaceSamples.java | 24 - .../generated/ExperimentsCancelSamples.java | 2 +- .../ExperimentsCreateOrUpdateSamples.java | 6 +- .../generated/ExperimentsDeleteSamples.java | 2 +- .../ExperimentsExecutionDetailsSamples.java | 2 +- .../ExperimentsGetByResourceGroupSamples.java | 2 +- .../ExperimentsGetExecutionSamples.java | 2 +- .../ExperimentsListAllExecutionsSamples.java | 2 +- ...ExperimentsListByResourceGroupSamples.java | 2 +- .../generated/ExperimentsListSamples.java | 2 +- .../generated/ExperimentsStartSamples.java | 2 +- .../generated/ExperimentsUpdateSamples.java | 2 +- .../OperationStatusesGetSamples.java | 2 +- .../PrivateAccessesCreateOrUpdateSamples.java | 50 - ...leteAPrivateEndpointConnectionSamples.java | 25 - .../PrivateAccessesDeleteSamples.java | 22 - ...sGetAPrivateEndpointConnectionSamples.java | 25 - ...vateAccessesGetByResourceGroupSamples.java | 38 - ...ccessesGetPrivateLinkResourcesSamples.java | 25 - ...ateAccessesListByResourceGroupSamples.java | 22 - ...ListPrivateEndpointConnectionsSamples.java | 24 - .../generated/PrivateAccessesListSamples.java | 22 - .../PrivateAccessesUpdateSamples.java | 41 - ...ioConfigurationsCreateOrUpdateSamples.java | 66 - .../ScenarioConfigurationsDeleteSamples.java | 24 - .../ScenarioConfigurationsExecuteSamples.java | 25 - ...urationsFixResourcePermissionsSamples.java | 25 - .../ScenarioConfigurationsGetSamples.java | 24 - .../ScenarioConfigurationsListAllSamples.java | 24 - ...ScenarioConfigurationsValidateSamples.java | 24 - .../generated/ScenarioRunsCancelSamples.java | 24 - .../generated/ScenarioRunsGetSamples.java | 24 - .../generated/ScenarioRunsListAllSamples.java | 24 - .../ScenariosCreateOrUpdateSamples.java | 83 - .../generated/ScenariosDeleteSamples.java | 24 - .../chaos/generated/ScenariosGetSamples.java | 23 - .../generated/ScenariosListAllSamples.java | 22 - .../generated/TargetTypesGetSamples.java | 2 +- .../generated/TargetTypesListSamples.java | 2 +- .../TargetsCreateOrUpdateSamples.java | 2 +- .../chaos/generated/TargetsDeleteSamples.java | 2 +- .../chaos/generated/TargetsGetSamples.java | 2 +- .../chaos/generated/TargetsListSamples.java | 2 +- .../WorkspacesCreateOrUpdateSamples.java | 53 - .../generated/WorkspacesDeleteSamples.java | 22 - .../WorkspacesGetByResourceGroupSamples.java | 23 - .../WorkspacesListByResourceGroupSamples.java | 22 - .../generated/WorkspacesListSamples.java | 22 - ...rkspacesRefreshRecommendationsSamples.java | 23 - .../generated/WorkspacesUpdateSamples.java | 50 - .../generated/ActionDependencyTests.java | 34 - .../chaos/generated/ActionInnerTests.java | 17 - .../generated/ActionListResultTests.java | 19 - ...ActionPropertiesParametersSchemaTests.java | 16 - .../generated/ActionPropertiesTests.java | 17 - .../ActionSupportedTargetTypeTests.java | 20 - .../generated/ActionVersionInnerTests.java | 17 - .../ActionVersionListResultTests.java | 19 - ...ctionVersionsGetWithResponseMockTests.java | 37 - .../ActionVersionsListMockTests.java | 37 - .../ActionsGetWithResponseMockTests.java | 36 - .../chaos/generated/ActionsListMockTests.java | 37 - ...esCreateOrUpdateWithResponseMockTests.java | 6 +- ...pabilitiesDeleteWithResponseMockTests.java | 2 +- .../CapabilitiesGetWithResponseMockTests.java | 4 +- .../generated/CapabilitiesListMockTests.java | 4 +- .../chaos/generated/CapabilityInnerTests.java | 2 +- .../generated/CapabilityListResultTests.java | 4 +- .../generated/CapabilityPropertiesTests.java | 2 +- .../generated/CapabilityTypeInnerTests.java | 2 +- .../CapabilityTypeListResultTests.java | 4 +- ...yTypePropertiesRuntimePropertiesTests.java | 4 +- .../CapabilityTypePropertiesTests.java | 2 +- ...pabilityTypesGetWithResponseMockTests.java | 4 +- .../CapabilityTypesListMockTests.java | 4 +- .../generated/ChaosExperimentActionTests.java | 11 +- .../generated/ChaosExperimentBranchTests.java | 17 +- .../generated/ChaosExperimentStepTests.java | 34 +- .../ChaosTargetListSelectorTests.java | 23 +- .../ChaosTargetQuerySelectorTests.java | 20 +- .../generated/ChaosTargetSelectorTests.java | 8 +- ...haosTargetSimpleFilterParametersTests.java | 10 +- .../ChaosTargetSimpleFilterTests.java | 16 +- .../generated/ConfigurationFiltersTests.java | 34 - .../CustomerDataStoragePropertiesTests.java | 30 - .../chaos/generated/DelayActionTests.java | 12 +- .../DiscoveredResourceInnerTests.java | 17 - .../DiscoveredResourceListResultTests.java | 19 - .../DiscoveredResourcePropertiesTests.java | 17 - ...eredResourcesGetWithResponseMockTests.java | 37 - ...eredResourcesListByWorkspaceMockTests.java | 37 - .../chaos/generated/EntraIdentityTests.java | 16 - .../ExperimentExecutionDetailsInnerTests.java | 2 +- ...nDetailsPropertiesRunInformationTests.java | 2 +- ...rimentExecutionDetailsPropertiesTests.java | 2 +- .../ExperimentExecutionInnerTests.java | 2 +- .../ExperimentExecutionListResultTests.java | 4 +- .../ExperimentExecutionPropertiesTests.java | 5 +- .../chaos/generated/ExperimentInnerTests.java | 121 +- .../generated/ExperimentListResultTests.java | 16 +- .../generated/ExperimentPropertiesTests.java | 87 +- .../generated/ExperimentUpdateTests.java | 19 +- .../ExperimentsCreateOrUpdateMockTests.java | 65 +- ...ExecutionDetailsWithResponseMockTests.java | 4 +- ...tByResourceGroupWithResponseMockTests.java | 18 +- ...entsGetExecutionWithResponseMockTests.java | 4 +- ...ExperimentsListAllExecutionsMockTests.java | 6 +- ...perimentsListByResourceGroupMockTests.java | 19 +- .../generated/ExperimentsListMockTests.java | 17 +- .../generated/ExternalResourceTests.java | 25 - .../FixResourcePermissionsRequestTests.java | 25 - .../generated/OperationDisplayTests.java | 2 +- .../chaos/generated/OperationInnerTests.java | 2 +- .../generated/OperationListResultTests.java | 4 +- .../chaos/generated/PermissionErrorTests.java | 17 - .../generated/PermissionsFixSummaryTests.java | 18 - .../PhysicalToLogicalZoneMappingTests.java | 17 - .../generated/PrivateAccessInnerTests.java | 48 - .../PrivateAccessListResultTests.java | 24 - .../generated/PrivateAccessPatchTests.java | 39 - .../PrivateAccessPropertiesTests.java | 28 - ...rivateAccessesCreateOrUpdateMockTests.java | 62 - ...dpointConnectionWithResponseMockTests.java | 44 - ...tByResourceGroupWithResponseMockTests.java | 42 - ...ateLinkResourcesWithResponseMockTests.java | 42 - ...eAccessesListByResourceGroupMockTests.java | 43 - .../PrivateAccessesListMockTests.java | 43 - ...stPrivateEndpointConnectionsMockTests.java | 45 - .../PrivateEndpointConnectionInnerTests.java | 24 - ...vateEndpointConnectionListResultTests.java | 26 - ...vateEndpointConnectionPropertiesTests.java | 23 - .../chaos/generated/PrivateEndpointTests.java | 15 - ...ivateLinkResourceListResultInnerTests.java | 22 - .../PrivateLinkResourcePropertiesTests.java | 19 - .../generated/PrivateLinkResourceTests.java | 21 - ...rivateLinkServiceConnectionStateTests.java | 22 - .../chaos/generated/RecommendationTests.java | 18 - .../generated/ResourceIdentityTests.java | 11 +- .../chaos/generated/RunAfterTests.java | 50 - ...gurationsExecuteWithResponseMockTests.java | 35 - .../ScenarioEvaluationResultItemTests.java | 21 - .../generated/ScenarioParameterTests.java | 39 - .../generated/ScenarioRunResourceTests.java | 15 - .../ScenarioRunSummaryActionTests.java | 17 - ...enarioRunsCancelWithResponseMockTests.java | 34 - .../ScenariosDeleteWithResponseMockTests.java | 34 - .../chaos/generated/StepStatusTests.java | 2 +- .../chaos/generated/TargetInnerTests.java | 12 +- .../generated/TargetListResultTests.java | 6 +- .../chaos/generated/TargetReferenceTests.java | 11 +- .../chaos/generated/TargetTypeInnerTests.java | 2 +- .../generated/TargetTypeListResultTests.java | 4 +- .../generated/TargetTypePropertiesTests.java | 2 +- .../TargetTypesGetWithResponseMockTests.java | 4 +- .../generated/TargetTypesListMockTests.java | 4 +- ...tsCreateOrUpdateWithResponseMockTests.java | 18 +- .../TargetsDeleteWithResponseMockTests.java | 2 +- .../TargetsGetWithResponseMockTests.java | 6 +- .../chaos/generated/TargetsListMockTests.java | 6 +- .../generated/UserAssignedIdentityTests.java | 5 +- .../chaos/generated/WorkspaceInnerTests.java | 57 - .../generated/WorkspaceListResultTests.java | 24 - .../generated/WorkspacePropertiesTests.java | 28 - .../chaos/generated/WorkspaceUpdateTests.java | 50 - .../WorkspacesCreateOrUpdateMockTests.java | 68 - ...tByResourceGroupWithResponseMockTests.java | 43 - ...orkspacesListByResourceGroupMockTests.java | 43 - .../generated/WorkspacesListMockTests.java | 42 - .../generated/ZoneResolutionInfoTests.java | 17 - .../generated/ZoneResolutionMappingTests.java | 17 - 345 files changed, 445 insertions(+), 28270 deletions(-) delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ActionVersionsClient.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ActionsClient.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/DiscoveredResourcesClient.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/PrivateAccessesClient.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ScenarioConfigurationsClient.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ScenarioRunsClient.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ScenariosClient.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/WorkspacesClient.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ActionInner.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ActionProperties.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ActionVersionInner.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/DiscoveredResourceInner.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/PrivateAccessInner.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/PrivateEndpointConnectionInner.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/PrivateLinkResourceListResultInner.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ScenarioConfigurationInner.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ScenarioInner.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ScenarioRunInner.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/WorkspaceInner.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ActionImpl.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ActionVersionImpl.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ActionVersionsClientImpl.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ActionVersionsImpl.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ActionsClientImpl.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ActionsImpl.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/DiscoveredResourceImpl.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/DiscoveredResourcesClientImpl.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/DiscoveredResourcesImpl.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/PrivateAccessImpl.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/PrivateAccessesClientImpl.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/PrivateAccessesImpl.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/PrivateEndpointConnectionImpl.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/PrivateLinkResourceListResultImpl.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioConfigurationImpl.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioConfigurationsClientImpl.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioConfigurationsImpl.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioImpl.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioRunImpl.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioRunsClientImpl.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioRunsImpl.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenariosClientImpl.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenariosImpl.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/WorkspaceImpl.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/WorkspacesClientImpl.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/WorkspacesImpl.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/ActionListResult.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/ActionVersionListResult.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/DiscoveredResourceListResult.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/PrivateAccessListResult.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/PrivateEndpointConnectionListResult.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/ScenarioConfigurationListResult.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/ScenarioListResult.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/ScenarioRunListResult.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/WorkspaceListResult.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Action.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionDependency.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionDependencyType.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionKind.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionLifecycle.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionPropertiesParametersSchema.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionSupportedTargetType.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionVersion.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionVersions.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Actions.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ConfigurationExclusions.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ConfigurationFilters.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/CustomerDataStorageProperties.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/DiscoveredResource.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/DiscoveredResourceProperties.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/DiscoveredResources.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/EntraIdentity.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ExternalResource.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/FixResourcePermissionsRequest.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/OperationError.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ParameterType.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PermissionError.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PermissionsFix.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PermissionsFixProperties.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PermissionsFixState.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PermissionsFixSummary.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PhysicalToLogicalZoneMapping.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateAccess.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateAccessPatch.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateAccessProperties.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateAccesses.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateEndpoint.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateEndpointConnection.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateEndpointConnectionProperties.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateEndpointServiceConnectionStatus.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateLinkResource.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateLinkResourceListResult.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateLinkResourceProperties.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateLinkServiceConnectionState.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PublicNetworkAccessOption.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Recommendation.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/RecommendationStatus.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ResourceStateError.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/RoleAssignmentError.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/RoleAssignmentResult.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/RoleAssignmentStatus.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/RunAfter.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/RunAfterBehavior.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Scenario.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioAction.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioConfiguration.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioConfigurationProperties.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioConfigurations.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioConfigurationsExecuteHeaders.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioConfigurationsExecuteResponse.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioErrors.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioEvaluationResultItem.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioParameter.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioProperties.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRun.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunProperties.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunResource.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunState.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunSummaryAction.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRuns.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunsCancelHeaders.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunsCancelResponse.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunsGetHeaders.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunsGetResponse.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioSummaryState.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioValidationState.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Scenarios.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Validation.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ValidationProperties.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Workspace.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/WorkspaceEvaluation.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/WorkspaceEvaluationProperties.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/WorkspaceEvaluationStatus.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/WorkspaceProperties.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/WorkspaceUpdate.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Workspaces.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ZoneResolutionInfo.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ZoneResolutionMapping.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ZoneResolutionMode.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ActionVersionsGetSamples.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ActionVersionsListSamples.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ActionsGetSamples.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ActionsListSamples.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/DiscoveredResourcesGetSamples.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/DiscoveredResourcesListByWorkspaceSamples.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesCreateOrUpdateSamples.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesDeleteAPrivateEndpointConnectionSamples.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesDeleteSamples.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesGetAPrivateEndpointConnectionSamples.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesGetByResourceGroupSamples.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesGetPrivateLinkResourcesSamples.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesListByResourceGroupSamples.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesListPrivateEndpointConnectionsSamples.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesListSamples.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesUpdateSamples.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsCreateOrUpdateSamples.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsDeleteSamples.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsExecuteSamples.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsFixResourcePermissionsSamples.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsGetSamples.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsListAllSamples.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsValidateSamples.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioRunsCancelSamples.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioRunsGetSamples.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioRunsListAllSamples.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenariosCreateOrUpdateSamples.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenariosDeleteSamples.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenariosGetSamples.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenariosListAllSamples.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/WorkspacesCreateOrUpdateSamples.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/WorkspacesDeleteSamples.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/WorkspacesGetByResourceGroupSamples.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/WorkspacesListByResourceGroupSamples.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/WorkspacesListSamples.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/WorkspacesRefreshRecommendationsSamples.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/WorkspacesUpdateSamples.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionDependencyTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionInnerTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionListResultTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionPropertiesParametersSchemaTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionPropertiesTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionSupportedTargetTypeTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionVersionInnerTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionVersionListResultTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionVersionsGetWithResponseMockTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionVersionsListMockTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionsGetWithResponseMockTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionsListMockTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ConfigurationFiltersTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CustomerDataStoragePropertiesTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/DiscoveredResourceInnerTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/DiscoveredResourceListResultTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/DiscoveredResourcePropertiesTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/DiscoveredResourcesGetWithResponseMockTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/DiscoveredResourcesListByWorkspaceMockTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/EntraIdentityTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExternalResourceTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/FixResourcePermissionsRequestTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PermissionErrorTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PermissionsFixSummaryTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PhysicalToLogicalZoneMappingTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessInnerTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessListResultTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessPatchTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessPropertiesTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesCreateOrUpdateMockTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesGetAPrivateEndpointConnectionWithResponseMockTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesGetByResourceGroupWithResponseMockTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesGetPrivateLinkResourcesWithResponseMockTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesListByResourceGroupMockTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesListMockTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesListPrivateEndpointConnectionsMockTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateEndpointConnectionInnerTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateEndpointConnectionListResultTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateEndpointConnectionPropertiesTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateEndpointTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateLinkResourceListResultInnerTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateLinkResourcePropertiesTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateLinkResourceTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateLinkServiceConnectionStateTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/RecommendationTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/RunAfterTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsExecuteWithResponseMockTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ScenarioEvaluationResultItemTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ScenarioParameterTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ScenarioRunResourceTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ScenarioRunSummaryActionTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ScenarioRunsCancelWithResponseMockTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ScenariosDeleteWithResponseMockTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspaceInnerTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspaceListResultTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspacePropertiesTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspaceUpdateTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspacesCreateOrUpdateMockTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspacesGetByResourceGroupWithResponseMockTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspacesListByResourceGroupMockTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspacesListMockTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ZoneResolutionInfoTests.java delete mode 100644 sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ZoneResolutionMappingTests.java diff --git a/sdk/chaos/azure-resourcemanager-chaos/CHANGELOG.md b/sdk/chaos/azure-resourcemanager-chaos/CHANGELOG.md index 81ddcc6f1fbf..e481f8b1edbb 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/CHANGELOG.md +++ b/sdk/chaos/azure-resourcemanager-chaos/CHANGELOG.md @@ -2,6 +2,7 @@ ## 1.4.0-beta.1 (2026-05-06) +- Azure Resource Manager Chaos client library for Java. This package contains Microsoft Azure SDK for Chaos Management SDK. Chaos Management Client. Package api-version 2025-01-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). - Azure Resource Manager Chaos client library for Java. This package contains Microsoft Azure SDK for Chaos Management SDK. Chaos Management Client. Package api-version 2026-05-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Breaking Changes diff --git a/sdk/chaos/azure-resourcemanager-chaos/README.md b/sdk/chaos/azure-resourcemanager-chaos/README.md index 6d3b774864bb..16515b4226da 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 api-version 2026-05-01-preview. 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 api-version 2025-01-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 diff --git a/sdk/chaos/azure-resourcemanager-chaos/SAMPLE.md b/sdk/chaos/azure-resourcemanager-chaos/SAMPLE.md index 6056cba6962a..3a22ed926441 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/SAMPLE.md +++ b/sdk/chaos/azure-resourcemanager-chaos/SAMPLE.md @@ -1,16 +1,6 @@ # Code snippets and samples -## ActionVersions - -- [Get](#actionversions_get) -- [List](#actionversions_list) - -## Actions - -- [Get](#actions_get) -- [List](#actions_list) - ## Capabilities - [CreateOrUpdate](#capabilities_createorupdate) @@ -23,11 +13,6 @@ - [Get](#capabilitytypes_get) - [List](#capabilitytypes_list) -## DiscoveredResources - -- [Get](#discoveredresources_get) -- [ListByWorkspace](#discoveredresources_listbyworkspace) - ## Experiments - [Cancel](#experiments_cancel) @@ -46,42 +31,6 @@ - [Get](#operationstatuses_get) -## PrivateAccesses - -- [CreateOrUpdate](#privateaccesses_createorupdate) -- [Delete](#privateaccesses_delete) -- [DeleteAPrivateEndpointConnection](#privateaccesses_deleteaprivateendpointconnection) -- [GetAPrivateEndpointConnection](#privateaccesses_getaprivateendpointconnection) -- [GetByResourceGroup](#privateaccesses_getbyresourcegroup) -- [GetPrivateLinkResources](#privateaccesses_getprivatelinkresources) -- [List](#privateaccesses_list) -- [ListByResourceGroup](#privateaccesses_listbyresourcegroup) -- [ListPrivateEndpointConnections](#privateaccesses_listprivateendpointconnections) -- [Update](#privateaccesses_update) - -## ScenarioConfigurations - -- [CreateOrUpdate](#scenarioconfigurations_createorupdate) -- [Delete](#scenarioconfigurations_delete) -- [Execute](#scenarioconfigurations_execute) -- [FixResourcePermissions](#scenarioconfigurations_fixresourcepermissions) -- [Get](#scenarioconfigurations_get) -- [ListAll](#scenarioconfigurations_listall) -- [Validate](#scenarioconfigurations_validate) - -## ScenarioRuns - -- [Cancel](#scenarioruns_cancel) -- [Get](#scenarioruns_get) -- [ListAll](#scenarioruns_listall) - -## Scenarios - -- [CreateOrUpdate](#scenarios_createorupdate) -- [Delete](#scenarios_delete) -- [Get](#scenarios_get) -- [ListAll](#scenarios_listall) - ## TargetTypes - [Get](#targettypes_get) @@ -93,101 +42,6 @@ - [Delete](#targets_delete) - [Get](#targets_get) - [List](#targets_list) - -## Workspaces - -- [CreateOrUpdate](#workspaces_createorupdate) -- [Delete](#workspaces_delete) -- [GetByResourceGroup](#workspaces_getbyresourcegroup) -- [List](#workspaces_list) -- [ListByResourceGroup](#workspaces_listbyresourcegroup) -- [RefreshRecommendations](#workspaces_refreshrecommendations) -- [Update](#workspaces_update) -### ActionVersions_Get - -```java -/** - * Samples for ActionVersions Get. - */ -public final class ActionVersionsGetSamples { - /* - * x-ms-original-file: 2026-05-01-preview/ActionVersions_Get.json - */ - /** - * Sample code: Get an Action Version for westus2 location. - * - * @param manager Entry point to ChaosManager. - */ - public static void getAnActionVersionForWestus2Location(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.actionVersions() - .getWithResponse("westus2", "microsoft-compute-shutdown", "1.0", com.azure.core.util.Context.NONE); - } -} -``` - -### ActionVersions_List - -```java -/** - * Samples for ActionVersions List. - */ -public final class ActionVersionsListSamples { - /* - * x-ms-original-file: 2026-05-01-preview/ActionVersions_List.json - */ - /** - * Sample code: List all Action Versions for a given action. - * - * @param manager Entry point to ChaosManager. - */ - public static void listAllActionVersionsForAGivenAction(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.actionVersions().list("westus2", "microsoft-compute-shutdown", null, com.azure.core.util.Context.NONE); - } -} -``` - -### Actions_Get - -```java -/** - * Samples for Actions Get. - */ -public final class ActionsGetSamples { - /* - * x-ms-original-file: 2026-05-01-preview/Actions_Get.json - */ - /** - * Sample code: Get an Action for westus2 location. - * - * @param manager Entry point to ChaosManager. - */ - public static void getAnActionForWestus2Location(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.actions().getWithResponse("westus2", "microsoft-compute-shutdown", com.azure.core.util.Context.NONE); - } -} -``` - -### Actions_List - -```java -/** - * Samples for Actions List. - */ -public final class ActionsListSamples { - /* - * x-ms-original-file: 2026-05-01-preview/Actions_List.json - */ - /** - * Sample code: List all Actions for westus2 location. - * - * @param manager Entry point to ChaosManager. - */ - public static void listAllActionsForWestus2Location(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.actions().list("westus2", null, com.azure.core.util.Context.NONE); - } -} -``` - ### Capabilities_CreateOrUpdate ```java @@ -198,7 +52,7 @@ import com.azure.resourcemanager.chaos.fluent.models.CapabilityInner; */ public final class CapabilitiesCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-05-01-preview/Capabilities_CreateOrUpdate.json + * x-ms-original-file: 2025-01-01/Capabilities_CreateOrUpdate.json */ /** * Sample code: Create/update a Capability that extends a virtual machine Target resource. @@ -222,7 +76,7 @@ public final class CapabilitiesCreateOrUpdateSamples { */ public final class CapabilitiesDeleteSamples { /* - * x-ms-original-file: 2026-05-01-preview/Capabilities_Delete.json + * x-ms-original-file: 2025-01-01/Capabilities_Delete.json */ /** * Sample code: Delete a Capability that extends a virtual machine Target resource. @@ -246,7 +100,7 @@ public final class CapabilitiesDeleteSamples { */ public final class CapabilitiesGetSamples { /* - * x-ms-original-file: 2026-05-01-preview/Capabilities_Get.json + * x-ms-original-file: 2025-01-01/Capabilities_Get.json */ /** * Sample code: Get a Capability that extends a virtual machine Target resource. @@ -270,7 +124,7 @@ public final class CapabilitiesGetSamples { */ public final class CapabilitiesListSamples { /* - * x-ms-original-file: 2026-05-01-preview/Capabilities_List.json + * x-ms-original-file: 2025-01-01/Capabilities_List.json */ /** * Sample code: List all Capabilities that extend a virtual machine Target resource. @@ -294,7 +148,7 @@ public final class CapabilitiesListSamples { */ public final class CapabilityTypesGetSamples { /* - * x-ms-original-file: 2026-05-01-preview/CapabilityTypes_Get.json + * x-ms-original-file: 2025-01-01/CapabilityTypes_Get.json */ /** * Sample code: Get a Capability Type for a virtual machine Target resource on westus2 location. @@ -317,7 +171,7 @@ public final class CapabilityTypesGetSamples { */ public final class CapabilityTypesListSamples { /* - * x-ms-original-file: 2026-05-01-preview/CapabilityTypes_List.json + * x-ms-original-file: 2025-01-01/CapabilityTypes_List.json */ /** * Sample code: List all Capability Types for a virtual machine Target resource on westus2 location. @@ -331,52 +185,6 @@ public final class CapabilityTypesListSamples { } ``` -### DiscoveredResources_Get - -```java -/** - * Samples for DiscoveredResources Get. - */ -public final class DiscoveredResourcesGetSamples { - /* - * x-ms-original-file: 2026-05-01-preview/DiscoveredResources_Get.json - */ - /** - * Sample code: Get a discovered resource. - * - * @param manager Entry point to ChaosManager. - */ - public static void getADiscoveredResource(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.discoveredResources() - .getWithResponse("exampleRG", "exampleWorkspace", "a1b2c3d4-e5f6-7890-abcd-ef1234567890", - com.azure.core.util.Context.NONE); - } -} -``` - -### DiscoveredResources_ListByWorkspace - -```java -/** - * Samples for DiscoveredResources ListByWorkspace. - */ -public final class DiscoveredResourcesListByWorkspaceSamples { - /* - * x-ms-original-file: 2026-05-01-preview/DiscoveredResources_ListByWorkspace.json - */ - /** - * Sample code: Get a list of discovered resources for a workspace. - * - * @param manager Entry point to ChaosManager. - */ - public static void - getAListOfDiscoveredResourcesForAWorkspace(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.discoveredResources() - .listByWorkspace("exampleRG", "exampleWorkspace", com.azure.core.util.Context.NONE); - } -} -``` - ### Experiments_Cancel ```java @@ -385,7 +193,7 @@ public final class DiscoveredResourcesListByWorkspaceSamples { */ public final class ExperimentsCancelSamples { /* - * x-ms-original-file: 2026-05-01-preview/Experiments_Cancel.json + * x-ms-original-file: 2025-01-01/Experiments_Cancel.json */ /** * Sample code: Cancel a running Experiment. @@ -405,7 +213,6 @@ import com.azure.resourcemanager.chaos.models.ChaosExperimentBranch; import com.azure.resourcemanager.chaos.models.ChaosExperimentStep; import com.azure.resourcemanager.chaos.models.ChaosTargetListSelector; import com.azure.resourcemanager.chaos.models.ContinuousAction; -import com.azure.resourcemanager.chaos.models.CustomerDataStorageProperties; import com.azure.resourcemanager.chaos.models.KeyValuePair; import com.azure.resourcemanager.chaos.models.ManagedServiceIdentityType; import com.azure.resourcemanager.chaos.models.ResourceIdentity; @@ -421,7 +228,7 @@ import java.util.Map; */ public final class ExperimentsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-05-01-preview/Experiments_CreateOrUpdate.json + * x-ms-original-file: 2025-01-01/Experiments_CreateOrUpdate.json */ /** * Sample code: Create/update a Experiment in a resource group. @@ -448,9 +255,6 @@ public final class ExperimentsCreateOrUpdateSamples { "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/exampleVM/providers/Microsoft.Chaos/targets/Microsoft-VirtualMachine"))))) .withTags(mapOf("key7131", "fakeTokenPlaceholder", "key2138", "fakeTokenPlaceholder")) .withIdentity(new ResourceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED)) - .withCustomerDataStorage(new CustomerDataStorageProperties().withStorageAccountResourceId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/exampleRG/providers/Microsoft.Storage/storageAccounts/exampleStorage") - .withBlobContainerName("azurechaosstudioexperiments")) .create(); } @@ -476,7 +280,7 @@ public final class ExperimentsCreateOrUpdateSamples { */ public final class ExperimentsDeleteSamples { /* - * x-ms-original-file: 2026-05-01-preview/Experiments_Delete.json + * x-ms-original-file: 2025-01-01/Experiments_Delete.json */ /** * Sample code: Delete a Experiment in a resource group. @@ -497,7 +301,7 @@ public final class ExperimentsDeleteSamples { */ public final class ExperimentsExecutionDetailsSamples { /* - * x-ms-original-file: 2026-05-01-preview/Experiments_ExecutionDetails.json + * x-ms-original-file: 2025-01-01/Experiments_ExecutionDetails.json */ /** * Sample code: Get experiment execution details. @@ -520,7 +324,7 @@ public final class ExperimentsExecutionDetailsSamples { */ public final class ExperimentsGetByResourceGroupSamples { /* - * x-ms-original-file: 2026-05-01-preview/Experiments_Get.json + * x-ms-original-file: 2025-01-01/Experiments_Get.json */ /** * Sample code: Get a Experiment in a resource group. @@ -542,7 +346,7 @@ public final class ExperimentsGetByResourceGroupSamples { */ public final class ExperimentsGetExecutionSamples { /* - * x-ms-original-file: 2026-05-01-preview/Experiments_GetExecution.json + * x-ms-original-file: 2025-01-01/Experiments_GetExecution.json */ /** * Sample code: Get the execution of a Experiment. @@ -565,7 +369,7 @@ public final class ExperimentsGetExecutionSamples { */ public final class ExperimentsListSamples { /* - * x-ms-original-file: 2026-05-01-preview/Experiments_ListAll.json + * x-ms-original-file: 2025-01-01/Experiments_ListAll.json */ /** * Sample code: List all Experiments in a subscription. @@ -586,7 +390,7 @@ public final class ExperimentsListSamples { */ public final class ExperimentsListAllExecutionsSamples { /* - * x-ms-original-file: 2026-05-01-preview/Experiments_ListAllExecutions.json + * x-ms-original-file: 2025-01-01/Experiments_ListAllExecutions.json */ /** * Sample code: List all executions of an Experiment. @@ -607,7 +411,7 @@ public final class ExperimentsListAllExecutionsSamples { */ public final class ExperimentsListByResourceGroupSamples { /* - * x-ms-original-file: 2026-05-01-preview/Experiments_List.json + * x-ms-original-file: 2025-01-01/Experiments_List.json */ /** * Sample code: List all Experiments in a resource group. @@ -628,7 +432,7 @@ public final class ExperimentsListByResourceGroupSamples { */ public final class ExperimentsStartSamples { /* - * x-ms-original-file: 2026-05-01-preview/Experiments_Start.json + * x-ms-original-file: 2025-01-01/Experiments_Start.json */ /** * Sample code: Start a Experiment. @@ -656,7 +460,7 @@ import java.util.Map; */ public final class ExperimentsUpdateSamples { /* - * x-ms-original-file: 2026-05-01-preview/Experiments_Update.json + * x-ms-original-file: 2025-01-01/Experiments_Update.json */ /** * Sample code: Update an Experiment in a resource group. @@ -698,7 +502,7 @@ public final class ExperimentsUpdateSamples { */ public final class OperationStatusesGetSamples { /* - * x-ms-original-file: 2026-05-01-preview/OperationStatuses_Get.json + * x-ms-original-file: 2025-01-01/OperationStatuses_Get.json */ /** * Sample code: Gets Chaos Studio async operation status. @@ -712,856 +516,149 @@ public final class OperationStatusesGetSamples { } ``` -### PrivateAccesses_CreateOrUpdate - -```java -import com.azure.resourcemanager.chaos.models.PrivateAccessProperties; -import com.azure.resourcemanager.chaos.models.PublicNetworkAccessOption; - -/** - * Samples for PrivateAccesses CreateOrUpdate. - */ -public final class PrivateAccessesCreateOrUpdateSamples { - /* - * x-ms-original-file: - * 2026-05-01-preview/PrivateAccesses_CreateOrUpdate_Create_Or_Update_A_Private_Access_Resource.json - */ - /** - * Sample code: Create or Update a private access resource. - * - * @param manager Entry point to ChaosManager. - */ - public static void createOrUpdateAPrivateAccessResource(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.privateAccesses() - .define("myPrivateAccess") - .withRegion("centraluseuap") - .withExistingResourceGroup("myResourceGroup") - .withProperties(new PrivateAccessProperties()) - .create(); - } - - /* - * x-ms-original-file: 2026-05-01-preview/ - * PrivateAccesses_CreateOrUpdate_Create_Or_Update_A_Private_Access_Resource_With_Public_Network_Access.json - */ - /** - * Sample code: Create or Update a private access resource with publicNetworkAccess. - * - * @param manager Entry point to ChaosManager. - */ - public static void createOrUpdateAPrivateAccessResourceWithPublicNetworkAccess( - com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.privateAccesses() - .define("myPrivateAccess") - .withRegion("centraluseuap") - .withExistingResourceGroup("myResourceGroup") - .withProperties(new PrivateAccessProperties().withPublicNetworkAccess(PublicNetworkAccessOption.ENABLED)) - .create(); - } -} -``` - -### PrivateAccesses_Delete +### TargetTypes_Get ```java /** - * Samples for PrivateAccesses Delete. + * Samples for TargetTypes Get. */ -public final class PrivateAccessesDeleteSamples { +public final class TargetTypesGetSamples { /* - * x-ms-original-file: 2026-05-01-preview/PrivateAccesses_Delete.json + * x-ms-original-file: 2025-01-01/TargetTypes_Get.json */ /** - * Sample code: Delete a private access resource. + * Sample code: Get a Target Type for westus2 location. * * @param manager Entry point to ChaosManager. */ - public static void deleteAPrivateAccessResource(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.privateAccesses().delete("myResourceGroup", "myPrivateAccess", com.azure.core.util.Context.NONE); + public static void getATargetTypeForWestus2Location(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.targetTypes().getWithResponse("westus2", "Microsoft-Agent", com.azure.core.util.Context.NONE); } } ``` -### PrivateAccesses_DeleteAPrivateEndpointConnection +### TargetTypes_List ```java /** - * Samples for PrivateAccesses DeleteAPrivateEndpointConnection. + * Samples for TargetTypes List. */ -public final class PrivateAccessesDeleteAPrivateEndpointConnectionSamples { +public final class TargetTypesListSamples { /* - * x-ms-original-file: 2026-05-01-preview/PrivateAccesses_DeleteAPrivateEndpointConnection.json + * x-ms-original-file: 2025-01-01/TargetTypes_List.json */ /** - * Sample code: Delete a private endpoint connection under a private access resource. + * Sample code: List all Target Types for westus2 location. * * @param manager Entry point to ChaosManager. */ - public static void deleteAPrivateEndpointConnectionUnderAPrivateAccessResource( - com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.privateAccesses() - .deleteAPrivateEndpointConnection("myResourceGroup", "myPrivateAccess", "myPrivateEndpointConnection", - com.azure.core.util.Context.NONE); + public static void listAllTargetTypesForWestus2Location(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.targetTypes().list("westus2", null, com.azure.core.util.Context.NONE); } } ``` -### PrivateAccesses_GetAPrivateEndpointConnection +### Targets_CreateOrUpdate ```java -/** - * Samples for PrivateAccesses GetAPrivateEndpointConnection. - */ -public final class PrivateAccessesGetAPrivateEndpointConnectionSamples { - /* - * x-ms-original-file: 2026-05-01-preview/PrivateAccesses_GetAPrivateEndpointConnection.json - */ - /** - * Sample code: Get information about a private endpoint connection under a private access resource. - * - * @param manager Entry point to ChaosManager. - */ - public static void getInformationAboutAPrivateEndpointConnectionUnderAPrivateAccessResource( - com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.privateAccesses() - .getAPrivateEndpointConnectionWithResponse("myResourceGroup", "myPrivateAccess", - "myPrivateEndpointConnection", com.azure.core.util.Context.NONE); - } -} -``` - -### PrivateAccesses_GetByResourceGroup +import com.azure.resourcemanager.chaos.fluent.models.TargetInner; +import java.util.HashMap; +import java.util.Map; -```java /** - * Samples for PrivateAccesses GetByResourceGroup. + * Samples for Targets CreateOrUpdate. */ -public final class PrivateAccessesGetByResourceGroupSamples { - /* - * x-ms-original-file: 2026-05-01-preview/PrivateAccesses_Get_Get_A_Private_Access_Resource.json - */ - /** - * Sample code: Get a private access resource. - * - * @param manager Entry point to ChaosManager. - */ - public static void getAPrivateAccessResource(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.privateAccesses() - .getByResourceGroupWithResponse("myResourceGroup", "myPrivateAccess", com.azure.core.util.Context.NONE); - } - +public final class TargetsCreateOrUpdateSamples { /* - * x-ms-original-file: - * 2026-05-01-preview/PrivateAccesses_Get_Get_A_Private_Access_Resource_With_Private_Endpoint.json + * x-ms-original-file: 2025-01-01/Targets_CreateOrUpdate.json */ /** - * Sample code: Get a private access resource with private endpoint. + * Sample code: Create/update a Target that extends a virtual machine resource. * * @param manager Entry point to ChaosManager. */ public static void - getAPrivateAccessResourceWithPrivateEndpoint(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.privateAccesses() - .getByResourceGroupWithResponse("myResourceGroup", "myPrivateAccess", com.azure.core.util.Context.NONE); - } -} -``` - -### PrivateAccesses_GetPrivateLinkResources - -```java -/** - * Samples for PrivateAccesses GetPrivateLinkResources. - */ -public final class PrivateAccessesGetPrivateLinkResourcesSamples { - /* - * x-ms-original-file: 2026-05-01-preview/PrivateAccesses_GetPrivateLinkResources.json - */ - /** - * Sample code: List all possible private link resources under private access resource. - * - * @param manager Entry point to ChaosManager. - */ - public static void listAllPossiblePrivateLinkResourcesUnderPrivateAccessResource( - com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.privateAccesses() - .getPrivateLinkResourcesWithResponse("myResourceGroup", "myPrivateAccess", + createUpdateATargetThatExtendsAVirtualMachineResource(com.azure.resourcemanager.chaos.ChaosManager manager) { + manager.targets() + .createOrUpdateWithResponse("exampleRG", "Microsoft.Compute", "virtualMachines", "exampleVM", + "Microsoft-VirtualMachine", new TargetInner().withProperties(mapOf()), com.azure.core.util.Context.NONE); } -} -``` -### PrivateAccesses_List - -```java -/** - * Samples for PrivateAccesses List. - */ -public final class PrivateAccessesListSamples { - /* - * x-ms-original-file: 2026-05-01-preview/PrivateAccesses_ListAll.json - */ - /** - * Sample code: List all private accesses in a subscription. - * - * @param manager Entry point to ChaosManager. - */ - public static void listAllPrivateAccessesInASubscription(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.privateAccesses().list(null, com.azure.core.util.Context.NONE); + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; } } ``` -### PrivateAccesses_ListByResourceGroup +### Targets_Delete ```java /** - * Samples for PrivateAccesses ListByResourceGroup. + * Samples for Targets Delete. */ -public final class PrivateAccessesListByResourceGroupSamples { +public final class TargetsDeleteSamples { /* - * x-ms-original-file: 2026-05-01-preview/PrivateAccesses_List.json + * x-ms-original-file: 2025-01-01/Targets_Delete.json */ /** - * Sample code: List all private access in a resource group. + * Sample code: Delete a Target that extends a virtual machine resource. * * @param manager Entry point to ChaosManager. */ - public static void listAllPrivateAccessInAResourceGroup(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.privateAccesses().listByResourceGroup("myResourceGroup", null, 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); } } ``` -### PrivateAccesses_ListPrivateEndpointConnections +### Targets_Get ```java /** - * Samples for PrivateAccesses ListPrivateEndpointConnections. + * Samples for Targets Get. */ -public final class PrivateAccessesListPrivateEndpointConnectionsSamples { +public final class TargetsGetSamples { /* - * x-ms-original-file: 2026-05-01-preview/PrivateAccesses_ListPrivateEndpointConnections.json + * x-ms-original-file: 2025-01-01/Targets_Get.json */ /** - * Sample code: List all private endpoint connections under a private access resource. + * Sample code: Get a Target that extends a virtual machine resource. * * @param manager Entry point to ChaosManager. */ - public static void listAllPrivateEndpointConnectionsUnderAPrivateAccessResource( - com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.privateAccesses() - .listPrivateEndpointConnections("myResourceGroup", "myPrivateAccess", 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); } } ``` -### PrivateAccesses_Update +### Targets_List ```java -import com.azure.resourcemanager.chaos.models.PrivateAccess; -import java.util.HashMap; -import java.util.Map; - /** - * Samples for PrivateAccesses Update. + * Samples for Targets List. */ -public final class PrivateAccessesUpdateSamples { +public final class TargetsListSamples { /* - * x-ms-original-file: 2026-05-01-preview/PrivateAccesses_Update.json + * x-ms-original-file: 2025-01-01/Targets_List.json */ /** - * Sample code: Update a private access resource's tags. - * - * @param manager Entry point to ChaosManager. - */ - public static void updateAPrivateAccessResourceSTags(com.azure.resourcemanager.chaos.ChaosManager manager) { - PrivateAccess resource = manager.privateAccesses() - .getByResourceGroupWithResponse("myResourceGroup", "myPrivateAccess", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} -``` - -### ScenarioConfigurations_CreateOrUpdate - -```java -import com.azure.resourcemanager.chaos.models.ConfigurationExclusions; -import com.azure.resourcemanager.chaos.models.ConfigurationFilters; -import com.azure.resourcemanager.chaos.models.KeyValuePair; -import com.azure.resourcemanager.chaos.models.ScenarioConfigurationProperties; -import java.util.Arrays; - -/** - * Samples for ScenarioConfigurations CreateOrUpdate. - */ -public final class ScenarioConfigurationsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2026-05-01-preview/ScenarioConfigurations_CreateOrUpdate_With_Physical_Zones.json - */ - /** - * Sample code: Create or update a scenario configuration with physical zone targeting. - * - * @param manager Entry point to ChaosManager. - */ - public static void createOrUpdateAScenarioConfigurationWithPhysicalZoneTargeting( - com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.scenarioConfigurations() - .define("config-physical-zone") - .withExistingScenario("exampleRG", "exampleWorkspace", "12345678-1234-1234-1234-123456789012") - .withProperties(new ScenarioConfigurationProperties().withScenarioId( - "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Chaos/workspaces/exampleWorkspace/scenarios/12345678-1234-1234-1234-123456789012") - .withParameters(Arrays.asList(new KeyValuePair().withKey("fakeTokenPlaceholder").withValue("PT10M"))) - .withExclusions(new ConfigurationExclusions().withResources(Arrays.asList( - "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/protectedVM"))) - .withFilters(new ConfigurationFilters().withLocations(Arrays.asList("westus2")) - .withPhysicalZones(Arrays.asList("westus2-az1")))) - .create(); - } - - /* - * x-ms-original-file: 2026-05-01-preview/ScenarioConfigurations_CreateOrUpdate.json - */ - /** - * Sample code: Create or update a scenario configuration. - * - * @param manager Entry point to ChaosManager. - */ - public static void createOrUpdateAScenarioConfiguration(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.scenarioConfigurations() - .define("config-5678-9012-3456-789012345678") - .withExistingScenario("exampleRG", "exampleWorkspace", "12345678-1234-1234-1234-123456789012") - .withProperties(new ScenarioConfigurationProperties().withScenarioId( - "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Chaos/workspaces/exampleWorkspace/scenarios/12345678-1234-1234-1234-123456789012") - .withParameters(Arrays.asList(new KeyValuePair().withKey("fakeTokenPlaceholder").withValue("PT10M"), - new KeyValuePair().withKey("fakeTokenPlaceholder") - .withValue( - "[\"/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/vm1\",\"/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/vm2\"]"))) - .withExclusions(new ConfigurationExclusions().withResources(Arrays.asList( - "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/protectedVM")) - .withTags(Arrays.asList(new KeyValuePair().withKey("fakeTokenPlaceholder").withValue("production"))) - .withTypes(Arrays.asList("Microsoft.Compute/virtualMachineScaleSets"))) - .withFilters( - new ConfigurationFilters().withLocations(Arrays.asList("eastus")).withZones(Arrays.asList("1")))) - .create(); - } -} -``` - -### ScenarioConfigurations_Delete - -```java -/** - * Samples for ScenarioConfigurations Delete. - */ -public final class ScenarioConfigurationsDeleteSamples { - /* - * x-ms-original-file: 2026-05-01-preview/ScenarioConfigurations_Delete.json - */ - /** - * Sample code: Delete a scenario configuration. - * - * @param manager Entry point to ChaosManager. - */ - public static void deleteAScenarioConfiguration(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.scenarioConfigurations() - .delete("exampleRG", "exampleWorkspace", "12345678-1234-1234-1234-123456789012", - "config-5678-9012-3456-789012345678", com.azure.core.util.Context.NONE); - } -} -``` - -### ScenarioConfigurations_Execute - -```java -/** - * Samples for ScenarioConfigurations Execute. - */ -public final class ScenarioConfigurationsExecuteSamples { - /* - * x-ms-original-file: 2026-05-01-preview/ScenarioConfigurations_Execute.json - */ - /** - * Sample code: Execute the scenario execution with the given scenario configuration. - * - * @param manager Entry point to ChaosManager. - */ - public static void executeTheScenarioExecutionWithTheGivenScenarioConfiguration( - com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.scenarioConfigurations() - .executeWithResponse("exampleRG", "exampleWorkspace", "12345678-1234-1234-1234-123456789012", - "config-5678-9012-3456-789012345678", com.azure.core.util.Context.NONE); - } -} -``` - -### ScenarioConfigurations_FixResourcePermissions - -```java - -/** - * Samples for ScenarioConfigurations FixResourcePermissions. - */ -public final class ScenarioConfigurationsFixResourcePermissionsSamples { - /* - * x-ms-original-file: 2026-05-01-preview/ScenarioConfigurations_FixResourcePermissions.json - */ - /** - * Sample code: Fixes resource permissions for the given scenario configuration. - * - * @param manager Entry point to ChaosManager. - */ - public static void - fixesResourcePermissionsForTheGivenScenarioConfiguration(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.scenarioConfigurations() - .fixResourcePermissions("exampleRG", "exampleWorkspace", "12345678-1234-1234-1234-123456789012", - "config-5678-9012-3456-789012345678", null, com.azure.core.util.Context.NONE); - } -} -``` - -### ScenarioConfigurations_Get - -```java -/** - * Samples for ScenarioConfigurations Get. - */ -public final class ScenarioConfigurationsGetSamples { - /* - * x-ms-original-file: 2026-05-01-preview/ScenarioConfigurations_Get.json - */ - /** - * Sample code: Get a scenario configuration. - * - * @param manager Entry point to ChaosManager. - */ - public static void getAScenarioConfiguration(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.scenarioConfigurations() - .getWithResponse("exampleRG", "exampleWorkspace", "12345678-1234-1234-1234-123456789012", - "config-5678-9012-3456-789012345678", com.azure.core.util.Context.NONE); - } -} -``` - -### ScenarioConfigurations_ListAll - -```java -/** - * Samples for ScenarioConfigurations ListAll. - */ -public final class ScenarioConfigurationsListAllSamples { - /* - * x-ms-original-file: 2026-05-01-preview/ScenarioConfigurations_ListAll.json - */ - /** - * Sample code: Get a list of scenario configurations. - * - * @param manager Entry point to ChaosManager. - */ - public static void getAListOfScenarioConfigurations(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.scenarioConfigurations() - .listAll("exampleRG", "exampleWorkspace", "12345678-1234-1234-1234-123456789012", - com.azure.core.util.Context.NONE); - } -} -``` - -### ScenarioConfigurations_Validate - -```java -/** - * Samples for ScenarioConfigurations Validate. - */ -public final class ScenarioConfigurationsValidateSamples { - /* - * x-ms-original-file: 2026-05-01-preview/ScenarioConfigurations_Validate.json - */ - /** - * Sample code: Validate the given scenario configuration. - * - * @param manager Entry point to ChaosManager. - */ - public static void validateTheGivenScenarioConfiguration(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.scenarioConfigurations() - .validate("exampleRG", "exampleWorkspace", "12345678-1234-1234-1234-123456789012", - "config-5678-9012-3456-789012345678", com.azure.core.util.Context.NONE); - } -} -``` - -### ScenarioRuns_Cancel - -```java -/** - * Samples for ScenarioRuns Cancel. - */ -public final class ScenarioRunsCancelSamples { - /* - * x-ms-original-file: 2026-05-01-preview/ScenarioRuns_Cancel.json - */ - /** - * Sample code: Cancel a running scenario run. - * - * @param manager Entry point to ChaosManager. - */ - public static void cancelARunningScenarioRun(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.scenarioRuns() - .cancelWithResponse("exampleRG", "exampleWorkspace", "12345678-1234-1234-1234-123456789012", - "abcd1234-5678-9012-3456-789012345678", com.azure.core.util.Context.NONE); - } -} -``` - -### ScenarioRuns_Get - -```java -/** - * Samples for ScenarioRuns Get. - */ -public final class ScenarioRunsGetSamples { - /* - * x-ms-original-file: 2026-05-01-preview/ScenarioRuns_Get.json - */ - /** - * Sample code: Get a scenario run. - * - * @param manager Entry point to ChaosManager. - */ - public static void getAScenarioRun(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.scenarioRuns() - .getWithResponse("exampleRG", "exampleWorkspace", "12345678-1234-1234-1234-123456789012", - "abcd1234-5678-9012-3456-789012345678", com.azure.core.util.Context.NONE); - } -} -``` - -### ScenarioRuns_ListAll - -```java -/** - * Samples for ScenarioRuns ListAll. - */ -public final class ScenarioRunsListAllSamples { - /* - * x-ms-original-file: 2026-05-01-preview/ScenarioRuns_ListAll.json - */ - /** - * Sample code: Get a list of scenario runs. - * - * @param manager Entry point to ChaosManager. - */ - public static void getAListOfScenarioRuns(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.scenarioRuns() - .listAll("exampleRG", "exampleWorkspace", "12345678-1234-1234-1234-123456789012", - com.azure.core.util.Context.NONE); - } -} -``` - -### Scenarios_CreateOrUpdate - -```java -import com.azure.resourcemanager.chaos.models.ExternalResource; -import com.azure.resourcemanager.chaos.models.KeyValuePair; -import com.azure.resourcemanager.chaos.models.ParameterType; -import com.azure.resourcemanager.chaos.models.ScenarioAction; -import com.azure.resourcemanager.chaos.models.ScenarioParameter; -import com.azure.resourcemanager.chaos.models.ScenarioProperties; -import java.util.Arrays; - -/** - * Samples for Scenarios CreateOrUpdate. - */ -public final class ScenariosCreateOrUpdateSamples { - /* - * x-ms-original-file: 2026-05-01-preview/Scenarios_CreateOrUpdate.json - */ - /** - * Sample code: Create or update a scenario. - * - * @param manager Entry point to ChaosManager. - */ - public static void createOrUpdateAScenario(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.scenarios() - .define("zoneDownScenario") - .withExistingWorkspace("exampleRG", "exampleWorkspace") - .withProperties(new ScenarioProperties().withDescription( - "Induces an outage of all discovered VM and VMSS instances in the target zone with an option to invoke custom scripted actions using Automation Runbooks. Additionally, it forces failover of discovered Redis instances to simulate backend zonal outage.") - .withParameters(Arrays.asList( - new ScenarioParameter().withName("duration") - .withType(ParameterType.STRING) - .withDefaultProperty("PT15M") - .withRequired(false) - .withDescription("The duration of the outage scenario."), - new ScenarioParameter().withName("customRunbook1ResourceId") - .withType(ParameterType.STRING) - .withRequired(false) - .withDescription( - "Optional custom runbook 1 resource ID. If not provided, this action will be skipped."), - new ScenarioParameter().withName("customRunbook1ParametersJson") - .withType(ParameterType.STRING) - .withDefaultProperty("{}") - .withRequired(false) - .withDescription("Optional custom runbook 1 parameters in JSON format."))) - .withActions( - Arrays - .asList( - new ScenarioAction().withName("vmssZoneDown") - .withActionId("urn:csci:microsoft:compute:shutdown/1.0.0") - .withDescription("Force shutdown VMSS instances in target zone") - .withDuration("%%{parameters.duration}%%") - .withParameters(Arrays.asList(new KeyValuePair().withKey("fakeTokenPlaceholder") - .withValue("%%{filters.zones}%%"))), - new ScenarioAction().withName("vmZoneDown") - .withActionId("urn:csci:microsoft:compute:shutdown/1.0.0") - .withDescription("Force shutdown VM instances in target zone") - .withDuration("%%{parameters.duration}%%") - .withParameters(Arrays.asList(new KeyValuePair().withKey("fakeTokenPlaceholder") - .withValue("%%{filters.zones}%%"))), - new ScenarioAction() - .withName("redisFailover") - .withActionId("urn:csci:microsoft:azureClusteredCacheForRedis:Reboot/1.0.0") - .withDescription("Force failover of Redis instances to simulate backend zonal outage") - .withDuration("PT5M") - .withParameters( - Arrays.asList( - new KeyValuePair().withKey("fakeTokenPlaceholder").withValue("PrimaryNode"))), - new ScenarioAction().withName("custom-runbook-1") - .withActionId("urn:csci:microsoft:Automation:StartRunbook/1.0.0") - .withDescription("Custom Runbook 1") - .withDuration("PT30M") - .withParameters(Arrays.asList(new KeyValuePair() - .withKey("fakeTokenPlaceholder") - .withValue("%%{parameters.customRunbook1ParametersJson}%%"))) - .withExternalResource(new ExternalResource().withResourceId( - "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Automation/automationAccounts/exampleAutomationAccount/runbooks/exampleRunbook"))))) - .create(); - } -} -``` - -### Scenarios_Delete - -```java -/** - * Samples for Scenarios Delete. - */ -public final class ScenariosDeleteSamples { - /* - * x-ms-original-file: 2026-05-01-preview/Scenarios_Delete.json - */ - /** - * Sample code: Delete a Scenario in a workspace. - * - * @param manager Entry point to ChaosManager. - */ - public static void deleteAScenarioInAWorkspace(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.scenarios() - .deleteWithResponse("exampleRG", "exampleWorkspace", "myVMShutdownScenario", - com.azure.core.util.Context.NONE); - } -} -``` - -### Scenarios_Get - -```java -/** - * Samples for Scenarios Get. - */ -public final class ScenariosGetSamples { - /* - * x-ms-original-file: 2026-05-01-preview/Scenarios_Get.json - */ - /** - * Sample code: Get a scenario. - * - * @param manager Entry point to ChaosManager. - */ - public static void getAScenario(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.scenarios() - .getWithResponse("exampleRG", "exampleWorkspace", "zoneDownScenario", com.azure.core.util.Context.NONE); - } -} -``` - -### Scenarios_ListAll - -```java -/** - * Samples for Scenarios ListAll. - */ -public final class ScenariosListAllSamples { - /* - * x-ms-original-file: 2026-05-01-preview/Scenarios_ListAll.json - */ - /** - * Sample code: Get a list of scenarios. - * - * @param manager Entry point to ChaosManager. - */ - public static void getAListOfScenarios(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.scenarios().listAll("exampleRG", "exampleWorkspace", com.azure.core.util.Context.NONE); - } -} -``` - -### TargetTypes_Get - -```java -/** - * Samples for TargetTypes Get. - */ -public final class TargetTypesGetSamples { - /* - * x-ms-original-file: 2026-05-01-preview/TargetTypes_Get.json - */ - /** - * Sample code: Get a Target Type for westus2 location. - * - * @param manager Entry point to ChaosManager. - */ - public static void getATargetTypeForWestus2Location(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.targetTypes().getWithResponse("westus2", "Microsoft-Agent", com.azure.core.util.Context.NONE); - } -} -``` - -### TargetTypes_List - -```java -/** - * Samples for TargetTypes List. - */ -public final class TargetTypesListSamples { - /* - * x-ms-original-file: 2026-05-01-preview/TargetTypes_List.json - */ - /** - * Sample code: List all Target Types for westus2 location. - * - * @param manager Entry point to ChaosManager. - */ - public static void listAllTargetTypesForWestus2Location(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.targetTypes().list("westus2", null, com.azure.core.util.Context.NONE); - } -} -``` - -### Targets_CreateOrUpdate - -```java -import com.azure.resourcemanager.chaos.fluent.models.TargetInner; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for Targets CreateOrUpdate. - */ -public final class TargetsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2026-05-01-preview/Targets_CreateOrUpdate.json - */ - /** - * Sample code: Create/update a Target that extends a virtual machine resource. - * - * @param manager Entry point to ChaosManager. - */ - public static void - createUpdateATargetThatExtendsAVirtualMachineResource(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.targets() - .createOrUpdateWithResponse("exampleRG", "Microsoft.Compute", "virtualMachines", "exampleVM", - "Microsoft-VirtualMachine", new TargetInner().withProperties(mapOf()), - com.azure.core.util.Context.NONE); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} -``` - -### Targets_Delete - -```java -/** - * Samples for Targets Delete. - */ -public final class TargetsDeleteSamples { - /* - * x-ms-original-file: 2026-05-01-preview/Targets_Delete.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); - } -} -``` - -### Targets_Get - -```java -/** - * Samples for Targets Get. - */ -public final class TargetsGetSamples { - /* - * x-ms-original-file: 2026-05-01-preview/Targets_Get.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); - } -} -``` - -### Targets_List - -```java -/** - * Samples for Targets List. - */ -public final class TargetsListSamples { - /* - * x-ms-original-file: 2026-05-01-preview/Targets_List.json - */ - /** - * Sample code: List all Targets that extend a virtual machine resource. + * Sample code: List all Targets that extend a virtual machine resource. * * @param manager Entry point to ChaosManager. */ @@ -1574,211 +671,3 @@ public final class TargetsListSamples { } ``` -### Workspaces_CreateOrUpdate - -```java -import com.azure.resourcemanager.chaos.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.chaos.models.ResourceIdentity; -import com.azure.resourcemanager.chaos.models.UserAssignedIdentity; -import com.azure.resourcemanager.chaos.models.WorkspaceProperties; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for Workspaces CreateOrUpdate. - */ -public final class WorkspacesCreateOrUpdateSamples { - /* - * x-ms-original-file: 2026-05-01-preview/Workspaces_CreateOrUpdate.json - */ - /** - * Sample code: Create/update a workspace in a resource group. - * - * @param manager Entry point to ChaosManager. - */ - public static void createUpdateAWorkspaceInAResourceGroup(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.workspaces() - .define("exampleWorkspace") - .withRegion("westus2") - .withExistingResourceGroup("exampleRG") - .withProperties(new WorkspaceProperties().withScopes(Arrays - .asList("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/exampleResourceGroup"))) - .withTags(mapOf("environment", "production", "department", "engineering", "project", "chaos-testing")) - .withIdentity(new ResourceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/exampleResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleIdentity", - new UserAssignedIdentity()))) - .create(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} -``` - -### Workspaces_Delete - -```java -/** - * Samples for Workspaces Delete. - */ -public final class WorkspacesDeleteSamples { - /* - * x-ms-original-file: 2026-05-01-preview/Workspaces_Delete.json - */ - /** - * Sample code: Delete a Workspace in a resource group. - * - * @param manager Entry point to ChaosManager. - */ - public static void deleteAWorkspaceInAResourceGroup(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.workspaces().delete("exampleRG", "exampleWorkspace", com.azure.core.util.Context.NONE); - } -} -``` - -### Workspaces_GetByResourceGroup - -```java -/** - * Samples for Workspaces GetByResourceGroup. - */ -public final class WorkspacesGetByResourceGroupSamples { - /* - * x-ms-original-file: 2026-05-01-preview/Workspaces_Get.json - */ - /** - * Sample code: Get a Workspace in a resource group. - * - * @param manager Entry point to ChaosManager. - */ - public static void getAWorkspaceInAResourceGroup(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.workspaces() - .getByResourceGroupWithResponse("exampleRG", "exampleWorkspace", com.azure.core.util.Context.NONE); - } -} -``` - -### Workspaces_List - -```java -/** - * Samples for Workspaces List. - */ -public final class WorkspacesListSamples { - /* - * x-ms-original-file: 2026-05-01-preview/Workspaces_ListAll.json - */ - /** - * Sample code: List all Workspaces in a subscription. - * - * @param manager Entry point to ChaosManager. - */ - public static void listAllWorkspacesInASubscription(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.workspaces().list(null, com.azure.core.util.Context.NONE); - } -} -``` - -### Workspaces_ListByResourceGroup - -```java -/** - * Samples for Workspaces ListByResourceGroup. - */ -public final class WorkspacesListByResourceGroupSamples { - /* - * x-ms-original-file: 2026-05-01-preview/Workspaces_List.json - */ - /** - * Sample code: List all Workspaces in a resource group. - * - * @param manager Entry point to ChaosManager. - */ - public static void listAllWorkspacesInAResourceGroup(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.workspaces().listByResourceGroup("exampleRG", null, com.azure.core.util.Context.NONE); - } -} -``` - -### Workspaces_RefreshRecommendations - -```java -/** - * Samples for Workspaces RefreshRecommendations. - */ -public final class WorkspacesRefreshRecommendationsSamples { - /* - * x-ms-original-file: 2026-05-01-preview/Workspaces_RefreshRecommendations.json - */ - /** - * Sample code: Refresh recommendations for all scenarios in a workspace. - * - * @param manager Entry point to ChaosManager. - */ - public static void - refreshRecommendationsForAllScenariosInAWorkspace(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.workspaces().refreshRecommendations("exampleRG", "exampleWorkspace", com.azure.core.util.Context.NONE); - } -} -``` - -### Workspaces_Update - -```java -import com.azure.resourcemanager.chaos.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.chaos.models.ResourceIdentity; -import com.azure.resourcemanager.chaos.models.UserAssignedIdentity; -import com.azure.resourcemanager.chaos.models.Workspace; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for Workspaces Update. - */ -public final class WorkspacesUpdateSamples { - /* - * x-ms-original-file: 2026-05-01-preview/Workspaces_Update.json - */ - /** - * Sample code: Update a Workspace in a resource group. - * - * @param manager Entry point to ChaosManager. - */ - public static void updateAWorkspaceInAResourceGroup(com.azure.resourcemanager.chaos.ChaosManager manager) { - Workspace resource = manager.workspaces() - .getByResourceGroupWithResponse("exampleRG", "exampleWorkspace", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withTags(mapOf("environment", "production", "department", "engineering", "project", "chaos-testing")) - .withIdentity(new ResourceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/exampleResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleIdentity", - new UserAssignedIdentity()))) - .apply(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} -``` - diff --git a/sdk/chaos/azure-resourcemanager-chaos/pom.xml b/sdk/chaos/azure-resourcemanager-chaos/pom.xml index e338c729d171..0bc47f77c572 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/pom.xml +++ b/sdk/chaos/azure-resourcemanager-chaos/pom.xml @@ -18,7 +18,7 @@ jar Microsoft Azure SDK for Chaos Management - This package contains Microsoft Azure SDK for Chaos Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Chaos Management Client. Package api-version 2026-05-01-preview. + 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 api-version 2025-01-01. https://github.com/Azure/azure-sdk-for-java 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 c29fc749f35e..2db6c4127d15 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 @@ -25,37 +25,21 @@ import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.chaos.fluent.ChaosManagementClient; -import com.azure.resourcemanager.chaos.implementation.ActionVersionsImpl; -import com.azure.resourcemanager.chaos.implementation.ActionsImpl; import com.azure.resourcemanager.chaos.implementation.CapabilitiesImpl; import com.azure.resourcemanager.chaos.implementation.CapabilityTypesImpl; import com.azure.resourcemanager.chaos.implementation.ChaosManagementClientBuilder; -import com.azure.resourcemanager.chaos.implementation.DiscoveredResourcesImpl; import com.azure.resourcemanager.chaos.implementation.ExperimentsImpl; import com.azure.resourcemanager.chaos.implementation.OperationStatusesImpl; import com.azure.resourcemanager.chaos.implementation.OperationsImpl; -import com.azure.resourcemanager.chaos.implementation.PrivateAccessesImpl; -import com.azure.resourcemanager.chaos.implementation.ScenarioConfigurationsImpl; -import com.azure.resourcemanager.chaos.implementation.ScenarioRunsImpl; -import com.azure.resourcemanager.chaos.implementation.ScenariosImpl; import com.azure.resourcemanager.chaos.implementation.TargetTypesImpl; import com.azure.resourcemanager.chaos.implementation.TargetsImpl; -import com.azure.resourcemanager.chaos.implementation.WorkspacesImpl; -import com.azure.resourcemanager.chaos.models.ActionVersions; -import com.azure.resourcemanager.chaos.models.Actions; import com.azure.resourcemanager.chaos.models.Capabilities; import com.azure.resourcemanager.chaos.models.CapabilityTypes; -import com.azure.resourcemanager.chaos.models.DiscoveredResources; import com.azure.resourcemanager.chaos.models.Experiments; import com.azure.resourcemanager.chaos.models.OperationStatuses; import com.azure.resourcemanager.chaos.models.Operations; -import com.azure.resourcemanager.chaos.models.PrivateAccesses; -import com.azure.resourcemanager.chaos.models.ScenarioConfigurations; -import com.azure.resourcemanager.chaos.models.ScenarioRuns; -import com.azure.resourcemanager.chaos.models.Scenarios; import com.azure.resourcemanager.chaos.models.TargetTypes; import com.azure.resourcemanager.chaos.models.Targets; -import com.azure.resourcemanager.chaos.models.Workspaces; import java.time.Duration; import java.time.temporal.ChronoUnit; import java.util.ArrayList; @@ -79,26 +63,10 @@ public final class ChaosManager { private Experiments experiments; - private PrivateAccesses privateAccesses; - - private Actions actions; - - private ActionVersions actionVersions; - private TargetTypes targetTypes; private OperationStatuses operationStatuses; - private Workspaces workspaces; - - private DiscoveredResources discoveredResources; - - private Scenarios scenarios; - - private ScenarioRuns scenarioRuns; - - private ScenarioConfigurations scenarioConfigurations; - private final ChaosManagementClient clientObject; private ChaosManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { @@ -374,42 +342,6 @@ public Experiments experiments() { return experiments; } - /** - * Gets the resource collection API of PrivateAccesses. It manages PrivateAccess. - * - * @return Resource collection API of PrivateAccesses. - */ - public PrivateAccesses privateAccesses() { - if (this.privateAccesses == null) { - this.privateAccesses = new PrivateAccessesImpl(clientObject.getPrivateAccesses(), this); - } - return privateAccesses; - } - - /** - * Gets the resource collection API of Actions. - * - * @return Resource collection API of Actions. - */ - public Actions actions() { - if (this.actions == null) { - this.actions = new ActionsImpl(clientObject.getActions(), this); - } - return actions; - } - - /** - * Gets the resource collection API of ActionVersions. - * - * @return Resource collection API of ActionVersions. - */ - public ActionVersions actionVersions() { - if (this.actionVersions == null) { - this.actionVersions = new ActionVersionsImpl(clientObject.getActionVersions(), this); - } - return actionVersions; - } - /** * Gets the resource collection API of TargetTypes. * @@ -434,67 +366,6 @@ public OperationStatuses operationStatuses() { return operationStatuses; } - /** - * Gets the resource collection API of Workspaces. It manages Workspace. - * - * @return Resource collection API of Workspaces. - */ - public Workspaces workspaces() { - if (this.workspaces == null) { - this.workspaces = new WorkspacesImpl(clientObject.getWorkspaces(), this); - } - return workspaces; - } - - /** - * Gets the resource collection API of DiscoveredResources. - * - * @return Resource collection API of DiscoveredResources. - */ - public DiscoveredResources discoveredResources() { - if (this.discoveredResources == null) { - this.discoveredResources = new DiscoveredResourcesImpl(clientObject.getDiscoveredResources(), this); - } - return discoveredResources; - } - - /** - * Gets the resource collection API of Scenarios. It manages Scenario. - * - * @return Resource collection API of Scenarios. - */ - public Scenarios scenarios() { - if (this.scenarios == null) { - this.scenarios = new ScenariosImpl(clientObject.getScenarios(), this); - } - return scenarios; - } - - /** - * Gets the resource collection API of ScenarioRuns. - * - * @return Resource collection API of ScenarioRuns. - */ - public ScenarioRuns scenarioRuns() { - if (this.scenarioRuns == null) { - this.scenarioRuns = new ScenarioRunsImpl(clientObject.getScenarioRuns(), this); - } - return scenarioRuns; - } - - /** - * Gets the resource collection API of ScenarioConfigurations. It manages ScenarioConfiguration. - * - * @return Resource collection API of ScenarioConfigurations. - */ - public ScenarioConfigurations scenarioConfigurations() { - if (this.scenarioConfigurations == null) { - this.scenarioConfigurations - = new ScenarioConfigurationsImpl(clientObject.getScenarioConfigurations(), this); - } - return scenarioConfigurations; - } - /** * Gets wrapped service client ChaosManagementClient providing direct access to the underlying auto-generated API * implementation, based on Azure REST API. diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ActionVersionsClient.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ActionVersionsClient.java deleted file mode 100644 index 515d31dffbce..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ActionVersionsClient.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.chaos.fluent.models.ActionVersionInner; - -/** - * An instance of this class provides access to all the operations defined in ActionVersionsClient. - */ -public interface ActionVersionsClient { - /** - * Get an Action Version resource for a given location and action. - * - * @param location The name of the Azure region. - * @param actionName String that represents an Action resource name. - * @param versionName String that represents an Action Version resource name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Action Version resource for a given location and action along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String location, String actionName, String versionName, - Context context); - - /** - * Get an Action Version resource for a given location and action. - * - * @param location The name of the Azure region. - * @param actionName String that represents an Action resource name. - * @param versionName String that represents an Action Version 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 an Action Version resource for a given location and action. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ActionVersionInner get(String location, String actionName, String versionName); - - /** - * Get a list of Action Version resources for a given location and action. - * - * @param location The name of the Azure region. - * @param actionName String that represents an Action 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 Action Version resources for a given location and action as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String location, String actionName); - - /** - * Get a list of Action Version resources for a given location and action. - * - * @param location The name of the Azure region. - * @param actionName String that represents an Action resource name. - * @param continuationToken String that sets the continuation token. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Action Version resources for a given location and action as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String location, String actionName, String continuationToken, - Context context); -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ActionsClient.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ActionsClient.java deleted file mode 100644 index 04fc34efac85..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ActionsClient.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.chaos.fluent.models.ActionInner; - -/** - * An instance of this class provides access to all the operations defined in ActionsClient. - */ -public interface ActionsClient { - /** - * Get an Action resource for a given location. - * - * @param location The name of the Azure region. - * @param actionName String that represents an Action resource name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Action resource for a given location along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String location, String actionName, Context context); - - /** - * Get an Action resource for a given location. - * - * @param location The name of the Azure region. - * @param actionName String that represents an Action 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 an Action resource for a given location. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ActionInner get(String location, String actionName); - - /** - * Get a list of Action resources for a given location. - * - * @param location The name of the Azure region. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Action resources for a given location as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String location); - - /** - * Get a list of Action resources for a given location. - * - * @param location The name of the Azure region. - * @param continuationToken String that sets the continuation token. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 Action resources for a given location as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String location, String continuationToken, Context context); -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ChaosManagementClient.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ChaosManagementClient.java index 6af3fef12ac8..0d648e81ac64 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 @@ -81,27 +81,6 @@ public interface ChaosManagementClient { */ ExperimentsClient getExperiments(); - /** - * Gets the PrivateAccessesClient object to access its operations. - * - * @return the PrivateAccessesClient object. - */ - PrivateAccessesClient getPrivateAccesses(); - - /** - * Gets the ActionsClient object to access its operations. - * - * @return the ActionsClient object. - */ - ActionsClient getActions(); - - /** - * Gets the ActionVersionsClient object to access its operations. - * - * @return the ActionVersionsClient object. - */ - ActionVersionsClient getActionVersions(); - /** * Gets the TargetTypesClient object to access its operations. * @@ -115,39 +94,4 @@ public interface ChaosManagementClient { * @return the OperationStatusesClient object. */ OperationStatusesClient getOperationStatuses(); - - /** - * Gets the WorkspacesClient object to access its operations. - * - * @return the WorkspacesClient object. - */ - WorkspacesClient getWorkspaces(); - - /** - * Gets the DiscoveredResourcesClient object to access its operations. - * - * @return the DiscoveredResourcesClient object. - */ - DiscoveredResourcesClient getDiscoveredResources(); - - /** - * Gets the ScenariosClient object to access its operations. - * - * @return the ScenariosClient object. - */ - ScenariosClient getScenarios(); - - /** - * Gets the ScenarioRunsClient object to access its operations. - * - * @return the ScenarioRunsClient object. - */ - ScenarioRunsClient getScenarioRuns(); - - /** - * Gets the ScenarioConfigurationsClient object to access its operations. - * - * @return the ScenarioConfigurationsClient object. - */ - ScenarioConfigurationsClient getScenarioConfigurations(); } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/DiscoveredResourcesClient.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/DiscoveredResourcesClient.java deleted file mode 100644 index 583736661fb2..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/DiscoveredResourcesClient.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.chaos.fluent.models.DiscoveredResourceInner; - -/** - * An instance of this class provides access to all the operations defined in DiscoveredResourcesClient. - */ -public interface DiscoveredResourcesClient { - /** - * Get a discovered resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param discoveredResourceName Name of the discovered 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. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a discovered resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, - String discoveredResourceName, Context context); - - /** - * Get a discovered resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param discoveredResourceName Name of the discovered resource. - * @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 discovered resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DiscoveredResourceInner get(String resourceGroupName, String workspaceName, String discoveredResourceName); - - /** - * Get a list of discovered resources for a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace 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 discovered resources for a workspace as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByWorkspace(String resourceGroupName, String workspaceName); - - /** - * Get a list of discovered resources for a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of discovered resources for a workspace as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByWorkspace(String resourceGroupName, String workspaceName, - Context context); -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/PrivateAccessesClient.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/PrivateAccessesClient.java deleted file mode 100644 index c47bbbbf0dec..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/PrivateAccessesClient.java +++ /dev/null @@ -1,447 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.chaos.fluent.models.PrivateAccessInner; -import com.azure.resourcemanager.chaos.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.chaos.fluent.models.PrivateLinkResourceListResultInner; -import com.azure.resourcemanager.chaos.models.PrivateAccessPatch; - -/** - * An instance of this class provides access to all the operations defined in PrivateAccessesClient. - */ -public interface PrivateAccessesClient { - /** - * Get a private access resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private access resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String privateAccessName, - Context context); - - /** - * Get a private access resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @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 private access resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PrivateAccessInner getByResourceGroup(String resourceGroupName, String privateAccessName); - - /** - * Create or update a private access. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param resource private access resource to be created or updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of privateAccesses tracked resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, PrivateAccessInner> beginCreateOrUpdate(String resourceGroupName, - String privateAccessName, PrivateAccessInner resource); - - /** - * Create or update a private access. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param resource private access resource to be created or updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of privateAccesses tracked resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, PrivateAccessInner> beginCreateOrUpdate(String resourceGroupName, - String privateAccessName, PrivateAccessInner resource, Context context); - - /** - * Create or update a private access. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param resource private access resource to be created or updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return privateAccesses tracked resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PrivateAccessInner createOrUpdate(String resourceGroupName, String privateAccessName, PrivateAccessInner resource); - - /** - * Create or update a private access. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param resource private access resource to be created or updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return privateAccesses tracked resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PrivateAccessInner createOrUpdate(String resourceGroupName, String privateAccessName, PrivateAccessInner resource, - Context context); - - /** - * Patch a private access tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param properties private access resource's tags to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of privateAccesses tracked resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, PrivateAccessInner> beginUpdate(String resourceGroupName, - String privateAccessName, PrivateAccessPatch properties); - - /** - * Patch a private access tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param properties private access resource's tags to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of privateAccesses tracked resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, PrivateAccessInner> beginUpdate(String resourceGroupName, - String privateAccessName, PrivateAccessPatch properties, Context context); - - /** - * Patch a private access tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param properties private access resource's tags to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return privateAccesses tracked resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PrivateAccessInner update(String resourceGroupName, String privateAccessName, PrivateAccessPatch properties); - - /** - * Patch a private access tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param properties private access resource's tags to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return privateAccesses tracked resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PrivateAccessInner update(String resourceGroupName, String privateAccessName, PrivateAccessPatch properties, - Context context); - - /** - * Delete a private access. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String privateAccessName); - - /** - * Delete a private access. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String privateAccessName, Context context); - - /** - * Delete a private access. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String privateAccessName); - - /** - * Delete a private access. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String privateAccessName, Context context); - - /** - * Get a list of private access resources in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private access resources in a resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Get a list of private access resources in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param continuationToken String that sets the continuation token. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private access resources in a resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, String continuationToken, - Context context); - - /** - * Get a list of private access 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 private access resources in a subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Get a list of private access resources in a subscription. - * - * @param continuationToken String that sets the continuation token. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private access resources in a subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String continuationToken, Context context); - - /** - * Gets the private link resources possible under private access resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private link resources possible under private access resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getPrivateLinkResourcesWithResponse(String resourceGroupName, - String privateAccessName, Context context); - - /** - * Gets the private link resources possible under private access resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private link resources possible under private access resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PrivateLinkResourceListResultInner getPrivateLinkResources(String resourceGroupName, String privateAccessName); - - /** - * Gets information about a private endpoint connection under a private access resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a private endpoint connection under a private access resource along with - * {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getAPrivateEndpointConnectionWithResponse(String resourceGroupName, - String privateAccessName, String privateEndpointConnectionName, Context context); - - /** - * Gets information about a private endpoint connection under a private access resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 information about a private endpoint connection under a private access resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionInner getAPrivateEndpointConnection(String resourceGroupName, String privateAccessName, - String privateEndpointConnectionName); - - /** - * Deletes a private endpoint connection under a private access resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDeleteAPrivateEndpointConnection(String resourceGroupName, - String privateAccessName, String privateEndpointConnectionName); - - /** - * Deletes a private endpoint connection under a private access resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDeleteAPrivateEndpointConnection(String resourceGroupName, - String privateAccessName, String privateEndpointConnectionName, Context context); - - /** - * Deletes a private endpoint connection under a private access resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void deleteAPrivateEndpointConnection(String resourceGroupName, String privateAccessName, - String privateEndpointConnectionName); - - /** - * Deletes a private endpoint connection under a private access resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void deleteAPrivateEndpointConnection(String resourceGroupName, String privateAccessName, - String privateEndpointConnectionName, Context context); - - /** - * List information about private endpoint connections under a private access resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @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 private link resources as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listPrivateEndpointConnections(String resourceGroupName, - String privateAccessName); - - /** - * List information about private endpoint connections under a private access resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private link resources as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listPrivateEndpointConnections(String resourceGroupName, - String privateAccessName, Context context); -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ScenarioConfigurationsClient.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ScenarioConfigurationsClient.java deleted file mode 100644 index e17cb75a1a56..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ScenarioConfigurationsClient.java +++ /dev/null @@ -1,388 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.chaos.fluent.models.ScenarioConfigurationInner; -import com.azure.resourcemanager.chaos.models.FixResourcePermissionsRequest; -import com.azure.resourcemanager.chaos.models.PermissionsFix; -import com.azure.resourcemanager.chaos.models.ScenarioConfigurationsExecuteResponse; -import com.azure.resourcemanager.chaos.models.Validation; - -/** - * An instance of this class provides access to all the operations defined in ScenarioConfigurationsClient. - */ -public interface ScenarioConfigurationsClient { - /** - * Get a scenario definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a scenario definition along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, - String scenarioName, String scenarioConfigurationName, Context context); - - /** - * Get a scenario definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @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 scenario definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ScenarioConfigurationInner get(String resourceGroupName, String workspaceName, String scenarioName, - String scenarioConfigurationName); - - /** - * Create or update a scenario definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of model that represents the scenario. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ScenarioConfigurationInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String scenarioName, String scenarioConfigurationName, - ScenarioConfigurationInner resource); - - /** - * Create or update a scenario definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of model that represents the scenario. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ScenarioConfigurationInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String scenarioName, String scenarioConfigurationName, - ScenarioConfigurationInner resource, Context context); - - /** - * Create or update a scenario definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return model that represents the scenario. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ScenarioConfigurationInner createOrUpdate(String resourceGroupName, String workspaceName, String scenarioName, - String scenarioConfigurationName, ScenarioConfigurationInner resource); - - /** - * Create or update a scenario definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return model that represents the scenario. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ScenarioConfigurationInner createOrUpdate(String resourceGroupName, String workspaceName, String scenarioName, - String scenarioConfigurationName, ScenarioConfigurationInner resource, Context context); - - /** - * Delete a scenario definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String scenarioName, - String scenarioConfigurationName); - - /** - * Delete a scenario definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String scenarioName, - String scenarioConfigurationName, Context context); - - /** - * Delete a scenario definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String scenarioName, String scenarioConfigurationName); - - /** - * Delete a scenario definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String scenarioName, String scenarioConfigurationName, - Context context); - - /** - * Get a list of scenario definitions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @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 scenario definitions as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listAll(String resourceGroupName, String workspaceName, - String scenarioName); - - /** - * Get a list of scenario definitions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of scenario definitions as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listAll(String resourceGroupName, String workspaceName, - String scenarioName, Context context); - - /** - * Execute the scenario execution with the given scenario configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ScenarioConfigurationsExecuteResponse executeWithResponse(String resourceGroupName, String workspaceName, - String scenarioName, String scenarioConfigurationName, Context context); - - /** - * Execute the scenario execution with the given scenario configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void execute(String resourceGroupName, String workspaceName, String scenarioName, String scenarioConfigurationName); - - /** - * Validate the given scenario configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Validation> beginValidate(String resourceGroupName, String workspaceName, - String scenarioName, String scenarioConfigurationName); - - /** - * Validate the given scenario configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Validation> beginValidate(String resourceGroupName, String workspaceName, - String scenarioName, String scenarioConfigurationName, Context context); - - /** - * Validate the given scenario configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Validation validate(String resourceGroupName, String workspaceName, String scenarioName, - String scenarioConfigurationName); - - /** - * Validate the given scenario configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Validation validate(String resourceGroupName, String workspaceName, String scenarioName, - String scenarioConfigurationName, Context context); - - /** - * Fixes resource permissions for the given scenario configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, PermissionsFix> beginFixResourcePermissions(String resourceGroupName, - String workspaceName, String scenarioName, String scenarioConfigurationName); - - /** - * Fixes resource permissions for the given scenario configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @param body The body parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, PermissionsFix> beginFixResourcePermissions(String resourceGroupName, - String workspaceName, String scenarioName, String scenarioConfigurationName, FixResourcePermissionsRequest body, - Context context); - - /** - * Fixes resource permissions for the given scenario configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PermissionsFix fixResourcePermissions(String resourceGroupName, String workspaceName, String scenarioName, - String scenarioConfigurationName); - - /** - * Fixes resource permissions for the given scenario configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @param body The body parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PermissionsFix fixResourcePermissions(String resourceGroupName, String workspaceName, String scenarioName, - String scenarioConfigurationName, FixResourcePermissionsRequest body, Context context); -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ScenarioRunsClient.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ScenarioRunsClient.java deleted file mode 100644 index e4ee58430f41..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ScenarioRunsClient.java +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.chaos.fluent.models.ScenarioRunInner; -import com.azure.resourcemanager.chaos.models.ScenarioRunsCancelResponse; -import com.azure.resourcemanager.chaos.models.ScenarioRunsGetResponse; - -/** - * An instance of this class provides access to all the operations defined in ScenarioRunsClient. - */ -public interface ScenarioRunsClient { - /** - * Get a scenario run. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param runId The name of the ScenarioRun. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a scenario run. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ScenarioRunsGetResponse getWithResponse(String resourceGroupName, String workspaceName, String scenarioName, - String runId, Context context); - - /** - * Get a scenario run. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param runId The name of the ScenarioRun. - * @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 scenario run. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ScenarioRunInner get(String resourceGroupName, String workspaceName, String scenarioName, String runId); - - /** - * Get a list of scenario runs. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @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 scenario runs as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listAll(String resourceGroupName, String workspaceName, String scenarioName); - - /** - * Get a list of scenario runs. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of scenario runs as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listAll(String resourceGroupName, String workspaceName, String scenarioName, - Context context); - - /** - * Cancel the currently running scenario execution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param runId The name of the ScenarioRun. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ScenarioRunsCancelResponse cancelWithResponse(String resourceGroupName, String workspaceName, String scenarioName, - String runId, Context context); - - /** - * Cancel the currently running scenario execution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param runId The name of the ScenarioRun. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void cancel(String resourceGroupName, String workspaceName, String scenarioName, String runId); -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ScenariosClient.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ScenariosClient.java deleted file mode 100644 index 760d47c04838..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/ScenariosClient.java +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.chaos.fluent.models.ScenarioInner; - -/** - * An instance of this class provides access to all the operations defined in ScenariosClient. - */ -public interface ScenariosClient { - /** - * Get a scenario. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a scenario along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, String scenarioName, - Context context); - - /** - * Get a scenario. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @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 scenario. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ScenarioInner get(String resourceGroupName, String workspaceName, String scenarioName); - - /** - * Create or update a scenario. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return model that represents the scenario along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, - String scenarioName, ScenarioInner resource, Context context); - - /** - * Create or update a scenario. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return model that represents the scenario. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ScenarioInner createOrUpdate(String resourceGroupName, String workspaceName, String scenarioName, - ScenarioInner resource); - - /** - * Delete a scenario. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String workspaceName, String scenarioName, - Context context); - - /** - * Delete a scenario. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String scenarioName); - - /** - * Get a list of scenarios. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace 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 scenarios as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listAll(String resourceGroupName, String workspaceName); - - /** - * Get a list of scenarios. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of scenarios as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listAll(String resourceGroupName, String workspaceName, Context context); -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/WorkspacesClient.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/WorkspacesClient.java deleted file mode 100644 index b250fd7b2c66..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/WorkspacesClient.java +++ /dev/null @@ -1,328 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.chaos.fluent.models.WorkspaceInner; -import com.azure.resourcemanager.chaos.models.WorkspaceEvaluation; -import com.azure.resourcemanager.chaos.models.WorkspaceUpdate; - -/** - * An instance of this class provides access to all the operations defined in WorkspacesClient. - */ -public interface WorkspacesClient { - /** - * Get a Workspace resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Workspace resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String workspaceName, - Context context); - - /** - * Get a Workspace resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace 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 Workspace resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceInner getByResourceGroup(String resourceGroupName, String workspaceName); - - /** - * Create or update a Workspace resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param resource Workspace resource to be created or updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of model that represents a Workspace resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkspaceInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, WorkspaceInner resource); - - /** - * Create or update a Workspace resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param resource Workspace resource to be created or updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of model that represents a Workspace resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkspaceInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, WorkspaceInner resource, Context context); - - /** - * Create or update a Workspace resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param resource Workspace resource to be created or updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return model that represents a Workspace resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceName, WorkspaceInner resource); - - /** - * Create or update a Workspace resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param resource Workspace resource to be created or updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return model that represents a Workspace resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceName, WorkspaceInner resource, - Context context); - - /** - * The operation to update a Workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param properties Parameters supplied to the Update Workspace operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of model that represents a Workspace resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkspaceInner> beginUpdate(String resourceGroupName, String workspaceName, - WorkspaceUpdate properties); - - /** - * The operation to update a Workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param properties Parameters supplied to the Update Workspace operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of model that represents a Workspace resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkspaceInner> beginUpdate(String resourceGroupName, String workspaceName, - WorkspaceUpdate properties, Context context); - - /** - * The operation to update a Workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param properties Parameters supplied to the Update Workspace operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return model that represents a Workspace resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceInner update(String resourceGroupName, String workspaceName, WorkspaceUpdate properties); - - /** - * The operation to update a Workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param properties Parameters supplied to the Update Workspace operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return model that represents a Workspace resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceInner update(String resourceGroupName, String workspaceName, WorkspaceUpdate properties, Context context); - - /** - * Delete a Workspace resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName); - - /** - * Delete a Workspace resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, Context context); - - /** - * Delete a Workspace resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName); - - /** - * Delete a Workspace resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, Context context); - - /** - * Get a list of Workspace resources in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Workspace resources in a resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Get a list of Workspace resources in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param continuationToken String that sets the continuation token. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Workspace resources in a resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, String continuationToken, - Context context); - - /** - * Get a list of all Workspace 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 all Workspace resources in a subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Get a list of all Workspace resources in a subscription. - * - * @param continuationToken String that sets the continuation token. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of all Workspace resources in a subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String continuationToken, Context context); - - /** - * Refreshes recommendation status for all scenarios in a given workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkspaceEvaluation> - beginRefreshRecommendations(String resourceGroupName, String workspaceName); - - /** - * Refreshes recommendation status for all scenarios in a given workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkspaceEvaluation> - beginRefreshRecommendations(String resourceGroupName, String workspaceName, Context context); - - /** - * Refreshes recommendation status for all scenarios in a given workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceEvaluation refreshRecommendations(String resourceGroupName, String workspaceName); - - /** - * Refreshes recommendation status for all scenarios in a given workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceEvaluation refreshRecommendations(String resourceGroupName, String workspaceName, Context context); -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ActionInner.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ActionInner.java deleted file mode 100644 index ec10fad5c109..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ActionInner.java +++ /dev/null @@ -1,228 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.chaos.models.ActionKind; -import com.azure.resourcemanager.chaos.models.ActionPropertiesParametersSchema; -import com.azure.resourcemanager.chaos.models.ActionSupportedTargetType; -import java.io.IOException; -import java.util.List; - -/** - * Model that represents an Action resource. - */ -@Immutable -public final class ActionInner extends ProxyResource { - /* - * The properties of the action resource. - */ - private ActionProperties innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of ActionInner class. - */ - private ActionInner() { - } - - /** - * Get the innerProperties property: The properties of the action resource. - * - * @return the innerProperties value. - */ - private ActionProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Get the canonicalId property: Canonical identifier of the action (e.g., "microsoft-compute-shutdown/1.0"). - * - * @return the canonicalId value. - */ - public String canonicalId() { - return this.innerProperties() == null ? null : this.innerProperties().canonicalId(); - } - - /** - * Get the displayName property: Human-readable display name of the action. - * - * @return the displayName value. - */ - public String displayName() { - return this.innerProperties() == null ? null : this.innerProperties().displayName(); - } - - /** - * Get the description property: Description of what this action does. - * - * @return the description value. - */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); - } - - /** - * Get the actionName property: The short name of the action (e.g., "Shutdown"). - * - * @return the actionName value. - */ - public String actionName() { - return this.innerProperties() == null ? null : this.innerProperties().actionName(); - } - - /** - * Get the version property: The version of the action (e.g., "1.0.0"). - * - * @return the version value. - */ - public String version() { - return this.innerProperties() == null ? null : this.innerProperties().version(); - } - - /** - * Get the actionType property: The type of the action. - * - * @return the actionType value. - */ - public ActionKind actionType() { - return this.innerProperties() == null ? null : this.innerProperties().actionType(); - } - - /** - * Get the supportedTargetTypes property: List of target types supported by this action. - * - * @return the supportedTargetTypes value. - */ - public List supportedTargetTypes() { - return this.innerProperties() == null ? null : this.innerProperties().supportedTargetTypes(); - } - - /** - * Get the parametersSchema property: JSON Schema describing the parameters for this action. - * - * @return the parametersSchema value. - */ - public ActionPropertiesParametersSchema parametersSchema() { - return this.innerProperties() == null ? null : this.innerProperties().parametersSchema(); - } - - /** - * Get the recommendedRoles property: Recommended Azure RBAC role definition GUIDs for this action. - * - * @return the recommendedRoles value. - */ - public List recommendedRoles() { - return this.innerProperties() == null ? null : this.innerProperties().recommendedRoles(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ActionInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ActionInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ActionInner. - */ - public static ActionInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ActionInner deserializedActionInner = new ActionInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedActionInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedActionInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedActionInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedActionInner.innerProperties = ActionProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedActionInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedActionInner; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ActionProperties.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ActionProperties.java deleted file mode 100644 index 380d90cb4d6d..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ActionProperties.java +++ /dev/null @@ -1,208 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.chaos.models.ActionKind; -import com.azure.resourcemanager.chaos.models.ActionPropertiesParametersSchema; -import com.azure.resourcemanager.chaos.models.ActionSupportedTargetType; -import java.io.IOException; -import java.util.List; - -/** - * Model that represents the properties of an Action resource. - */ -@Immutable -public final class ActionProperties implements JsonSerializable { - /* - * Canonical identifier of the action (e.g., "microsoft-compute-shutdown/1.0"). - */ - private String canonicalId; - - /* - * Human-readable display name of the action. - */ - private String displayName; - - /* - * Description of what this action does. - */ - private String description; - - /* - * The short name of the action (e.g., "Shutdown"). - */ - private String actionName; - - /* - * The version of the action (e.g., "1.0.0"). - */ - private String version; - - /* - * The type of the action. - */ - private ActionKind actionType; - - /* - * List of target types supported by this action. - */ - private List supportedTargetTypes; - - /* - * JSON Schema describing the parameters for this action. - */ - private ActionPropertiesParametersSchema parametersSchema; - - /* - * Recommended Azure RBAC role definition GUIDs for this action. - */ - private List recommendedRoles; - - /** - * Creates an instance of ActionProperties class. - */ - private ActionProperties() { - } - - /** - * Get the canonicalId property: Canonical identifier of the action (e.g., "microsoft-compute-shutdown/1.0"). - * - * @return the canonicalId value. - */ - public String canonicalId() { - return this.canonicalId; - } - - /** - * Get the displayName property: Human-readable display name of the action. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Get the description property: Description of what this action does. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Get the actionName property: The short name of the action (e.g., "Shutdown"). - * - * @return the actionName value. - */ - public String actionName() { - return this.actionName; - } - - /** - * Get the version property: The version of the action (e.g., "1.0.0"). - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Get the actionType property: The type of the action. - * - * @return the actionType value. - */ - public ActionKind actionType() { - return this.actionType; - } - - /** - * Get the supportedTargetTypes property: List of target types supported by this action. - * - * @return the supportedTargetTypes value. - */ - public List supportedTargetTypes() { - return this.supportedTargetTypes; - } - - /** - * Get the parametersSchema property: JSON Schema describing the parameters for this action. - * - * @return the parametersSchema value. - */ - public ActionPropertiesParametersSchema parametersSchema() { - return this.parametersSchema; - } - - /** - * Get the recommendedRoles property: Recommended Azure RBAC role definition GUIDs for this action. - * - * @return the recommendedRoles value. - */ - public List recommendedRoles() { - return this.recommendedRoles; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ActionProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ActionProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ActionProperties. - */ - public static ActionProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ActionProperties deserializedActionProperties = new ActionProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("canonicalId".equals(fieldName)) { - deserializedActionProperties.canonicalId = reader.getString(); - } else if ("displayName".equals(fieldName)) { - deserializedActionProperties.displayName = reader.getString(); - } else if ("description".equals(fieldName)) { - deserializedActionProperties.description = reader.getString(); - } else if ("actionName".equals(fieldName)) { - deserializedActionProperties.actionName = reader.getString(); - } else if ("version".equals(fieldName)) { - deserializedActionProperties.version = reader.getString(); - } else if ("actionType".equals(fieldName)) { - deserializedActionProperties.actionType = ActionKind.fromString(reader.getString()); - } else if ("supportedTargetTypes".equals(fieldName)) { - List supportedTargetTypes - = reader.readArray(reader1 -> ActionSupportedTargetType.fromJson(reader1)); - deserializedActionProperties.supportedTargetTypes = supportedTargetTypes; - } else if ("parametersSchema".equals(fieldName)) { - deserializedActionProperties.parametersSchema = ActionPropertiesParametersSchema.fromJson(reader); - } else if ("recommendedRoles".equals(fieldName)) { - List recommendedRoles = reader.readArray(reader1 -> reader1.getString()); - deserializedActionProperties.recommendedRoles = recommendedRoles; - } else { - reader.skipChildren(); - } - } - - return deserializedActionProperties; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ActionVersionInner.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ActionVersionInner.java deleted file mode 100644 index 6f2461552e3d..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ActionVersionInner.java +++ /dev/null @@ -1,228 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.chaos.models.ActionKind; -import com.azure.resourcemanager.chaos.models.ActionPropertiesParametersSchema; -import com.azure.resourcemanager.chaos.models.ActionSupportedTargetType; -import java.io.IOException; -import java.util.List; - -/** - * Model that represents an Action Version resource. - */ -@Immutable -public final class ActionVersionInner extends ProxyResource { - /* - * The properties of the action version resource. - */ - private ActionProperties innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of ActionVersionInner class. - */ - private ActionVersionInner() { - } - - /** - * Get the innerProperties property: The properties of the action version resource. - * - * @return the innerProperties value. - */ - private ActionProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Get the canonicalId property: Canonical identifier of the action (e.g., "microsoft-compute-shutdown/1.0"). - * - * @return the canonicalId value. - */ - public String canonicalId() { - return this.innerProperties() == null ? null : this.innerProperties().canonicalId(); - } - - /** - * Get the displayName property: Human-readable display name of the action. - * - * @return the displayName value. - */ - public String displayName() { - return this.innerProperties() == null ? null : this.innerProperties().displayName(); - } - - /** - * Get the description property: Description of what this action does. - * - * @return the description value. - */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); - } - - /** - * Get the actionName property: The short name of the action (e.g., "Shutdown"). - * - * @return the actionName value. - */ - public String actionName() { - return this.innerProperties() == null ? null : this.innerProperties().actionName(); - } - - /** - * Get the version property: The version of the action (e.g., "1.0.0"). - * - * @return the version value. - */ - public String version() { - return this.innerProperties() == null ? null : this.innerProperties().version(); - } - - /** - * Get the actionType property: The type of the action. - * - * @return the actionType value. - */ - public ActionKind actionType() { - return this.innerProperties() == null ? null : this.innerProperties().actionType(); - } - - /** - * Get the supportedTargetTypes property: List of target types supported by this action. - * - * @return the supportedTargetTypes value. - */ - public List supportedTargetTypes() { - return this.innerProperties() == null ? null : this.innerProperties().supportedTargetTypes(); - } - - /** - * Get the parametersSchema property: JSON Schema describing the parameters for this action. - * - * @return the parametersSchema value. - */ - public ActionPropertiesParametersSchema parametersSchema() { - return this.innerProperties() == null ? null : this.innerProperties().parametersSchema(); - } - - /** - * Get the recommendedRoles property: Recommended Azure RBAC role definition GUIDs for this action. - * - * @return the recommendedRoles value. - */ - public List recommendedRoles() { - return this.innerProperties() == null ? null : this.innerProperties().recommendedRoles(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ActionVersionInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ActionVersionInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ActionVersionInner. - */ - public static ActionVersionInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ActionVersionInner deserializedActionVersionInner = new ActionVersionInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedActionVersionInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedActionVersionInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedActionVersionInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedActionVersionInner.innerProperties = ActionProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedActionVersionInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedActionVersionInner; - }); - } -} 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 8a3dd8a11498..3432b189c103 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 @@ -10,7 +10,6 @@ import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.chaos.models.ProvisioningState; import java.io.IOException; /** @@ -142,16 +141,6 @@ public String urn() { return this.innerProperties() == null ? null : this.innerProperties().urn(); } - /** - * Get the provisioningState property: Resource provisioning state. Not currently in use because resource is created - * synchronously. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - /** * {@inheritDoc} */ 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 dd1e2f48bea3..e0d1dd7c640e 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 @@ -9,7 +9,6 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.chaos.models.ProvisioningState; import java.io.IOException; /** @@ -42,11 +41,6 @@ public final class CapabilityProperties implements JsonSerializable { - DiscoveredResourceInner deserializedDiscoveredResourceInner = new DiscoveredResourceInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedDiscoveredResourceInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedDiscoveredResourceInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedDiscoveredResourceInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedDiscoveredResourceInner.properties = DiscoveredResourceProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedDiscoveredResourceInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedDiscoveredResourceInner; - }); - } -} 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 b1a8502929c2..b20271e1a9a5 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 @@ -10,7 +10,6 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.chaos.models.ExperimentExecutionDetailsPropertiesRunInformation; -import com.azure.resourcemanager.chaos.models.ProvisioningState; import java.io.IOException; import java.time.OffsetDateTime; @@ -108,15 +107,6 @@ public OffsetDateTime stoppedAt() { return this.innerProperties() == null ? null : this.innerProperties().stoppedAt(); } - /** - * Get the provisioningState property: Resource provisioning state. Not currently in use for executions. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - /** * Get the failureReason property: The reason why the execution failed. * 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 88afdaccbade..087d02f9b479 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 @@ -11,7 +11,6 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.chaos.models.ExperimentExecutionDetailsPropertiesRunInformation; -import com.azure.resourcemanager.chaos.models.ProvisioningState; import java.io.IOException; import java.time.OffsetDateTime; @@ -36,11 +35,6 @@ public final class ExperimentExecutionDetailsProperties */ private OffsetDateTime stoppedAt; - /* - * Resource provisioning state. Not currently in use for executions. - */ - private ProvisioningState provisioningState; - /* * The reason why the execution failed. */ @@ -89,15 +83,6 @@ public OffsetDateTime stoppedAt() { return this.stoppedAt; } - /** - * Get the provisioningState property: Resource provisioning state. Not currently in use for executions. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - /** * Get the failureReason property: The reason why the execution failed. * @@ -158,9 +143,6 @@ public static ExperimentExecutionDetailsProperties fromJson(JsonReader jsonReade } else if ("stoppedAt".equals(fieldName)) { deserializedExperimentExecutionDetailsProperties.stoppedAt = reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("provisioningState".equals(fieldName)) { - deserializedExperimentExecutionDetailsProperties.provisioningState - = ProvisioningState.fromString(reader.getString()); } else if ("failureReason".equals(fieldName)) { deserializedExperimentExecutionDetailsProperties.failureReason = reader.getString(); } else if ("lastActionAt".equals(fieldName)) { 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 fc628475dfb5..e3a18e4cd2d4 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 @@ -10,7 +10,6 @@ import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.chaos.models.ProvisioningState; import java.io.IOException; import java.time.OffsetDateTime; @@ -125,15 +124,6 @@ public OffsetDateTime stoppedAt() { return this.innerProperties() == null ? null : this.innerProperties().stoppedAt(); } - /** - * Get the provisioningState property: Resource provisioning state. Not currently in use for executions. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - /** * {@inheritDoc} */ 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 f001f2d99e80..ea7254292a54 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 @@ -10,7 +10,6 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.chaos.models.ProvisioningState; import java.io.IOException; import java.time.OffsetDateTime; @@ -34,11 +33,6 @@ public final class ExperimentExecutionProperties implements JsonSerializable CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("provisioningState".equals(fieldName)) { - deserializedExperimentExecutionProperties.provisioningState - = ProvisioningState.fromString(reader.getString()); } else { reader.skipChildren(); } 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 3cabe5c985cb..b75db2b79acd 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 @@ -12,7 +12,6 @@ import com.azure.json.JsonWriter; import com.azure.resourcemanager.chaos.models.ChaosExperimentStep; import com.azure.resourcemanager.chaos.models.ChaosTargetSelector; -import com.azure.resourcemanager.chaos.models.CustomerDataStorageProperties; import com.azure.resourcemanager.chaos.models.ProvisioningState; import com.azure.resourcemanager.chaos.models.ResourceIdentity; import java.io.IOException; @@ -201,31 +200,6 @@ public ExperimentInner withSelectors(List selectors) { return this; } - /** - * Get the customerDataStorage property: Optional customer-managed Storage account where Experiment schema will be - * stored. - * - * @return the customerDataStorage value. - */ - public CustomerDataStorageProperties customerDataStorage() { - return this.innerProperties() == null ? null : this.innerProperties().customerDataStorage(); - } - - /** - * Set the customerDataStorage property: Optional customer-managed Storage account where Experiment schema will be - * stored. - * - * @param customerDataStorage the customerDataStorage value to set. - * @return the ExperimentInner object itself. - */ - public ExperimentInner withCustomerDataStorage(CustomerDataStorageProperties customerDataStorage) { - if (this.innerProperties() == null) { - this.innerProperties = new ExperimentProperties(); - } - this.innerProperties().withCustomerDataStorage(customerDataStorage); - return this; - } - /** * {@inheritDoc} */ 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 4fda17bfff7b..d540816e811d 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 @@ -11,7 +11,6 @@ import com.azure.json.JsonWriter; import com.azure.resourcemanager.chaos.models.ChaosExperimentStep; import com.azure.resourcemanager.chaos.models.ChaosTargetSelector; -import com.azure.resourcemanager.chaos.models.CustomerDataStorageProperties; import com.azure.resourcemanager.chaos.models.ProvisioningState; import java.io.IOException; import java.util.List; @@ -36,11 +35,6 @@ public final class ExperimentProperties implements JsonSerializable selectors; - /* - * Optional customer-managed Storage account where Experiment schema will be stored. - */ - private CustomerDataStorageProperties customerDataStorage; - /** * Creates an instance of ExperimentProperties class. */ @@ -96,28 +90,6 @@ public ExperimentProperties withSelectors(List selectors) { return this; } - /** - * Get the customerDataStorage property: Optional customer-managed Storage account where Experiment schema will be - * stored. - * - * @return the customerDataStorage value. - */ - public CustomerDataStorageProperties customerDataStorage() { - return this.customerDataStorage; - } - - /** - * Set the customerDataStorage property: Optional customer-managed Storage account where Experiment schema will be - * stored. - * - * @param customerDataStorage the customerDataStorage value to set. - * @return the ExperimentProperties object itself. - */ - public ExperimentProperties withCustomerDataStorage(CustomerDataStorageProperties customerDataStorage) { - this.customerDataStorage = customerDataStorage; - return this; - } - /** * {@inheritDoc} */ @@ -126,7 +98,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeArrayField("steps", this.steps, (writer, element) -> writer.writeJson(element)); jsonWriter.writeArrayField("selectors", this.selectors, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("customerDataStorage", this.customerDataStorage); return jsonWriter.writeEndObject(); } @@ -157,9 +128,6 @@ public static ExperimentProperties fromJson(JsonReader jsonReader) throws IOExce } else if ("provisioningState".equals(fieldName)) { deserializedExperimentProperties.provisioningState = ProvisioningState.fromString(reader.getString()); - } else if ("customerDataStorage".equals(fieldName)) { - deserializedExperimentProperties.customerDataStorage - = CustomerDataStorageProperties.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/PrivateAccessInner.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/PrivateAccessInner.java deleted file mode 100644 index bb1125ac78cb..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/PrivateAccessInner.java +++ /dev/null @@ -1,181 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.chaos.models.PrivateAccessProperties; -import java.io.IOException; -import java.util.Map; - -/** - * PrivateAccesses tracked resource. - */ -@Fluent -public final class PrivateAccessInner extends Resource { - /* - * The resource-specific properties for this resource. - */ - private PrivateAccessProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of PrivateAccessInner class. - */ - public PrivateAccessInner() { - } - - /** - * Get the properties property: The resource-specific properties for this resource. - * - * @return the properties value. - */ - public PrivateAccessProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The resource-specific properties for this resource. - * - * @param properties the properties value to set. - * @return the PrivateAccessInner object itself. - */ - public PrivateAccessInner withProperties(PrivateAccessProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public PrivateAccessInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public PrivateAccessInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", location()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PrivateAccessInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateAccessInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the PrivateAccessInner. - */ - public static PrivateAccessInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateAccessInner deserializedPrivateAccessInner = new PrivateAccessInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedPrivateAccessInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedPrivateAccessInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedPrivateAccessInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedPrivateAccessInner.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedPrivateAccessInner.withTags(tags); - } else if ("properties".equals(fieldName)) { - deserializedPrivateAccessInner.properties = PrivateAccessProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedPrivateAccessInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateAccessInner; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/PrivateEndpointConnectionInner.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/PrivateEndpointConnectionInner.java deleted file mode 100644 index c9b424f10177..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/PrivateEndpointConnectionInner.java +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.chaos.models.PrivateEndpointConnectionProperties; -import java.io.IOException; - -/** - * The private endpoint connection resource. - */ -@Immutable -public final class PrivateEndpointConnectionInner extends ProxyResource { - /* - * Resource properties. - */ - private PrivateEndpointConnectionProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of PrivateEndpointConnectionInner class. - */ - private PrivateEndpointConnectionInner() { - } - - /** - * Get the properties property: Resource properties. - * - * @return the properties value. - */ - public PrivateEndpointConnectionProperties properties() { - return this.properties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PrivateEndpointConnectionInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateEndpointConnectionInner if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the PrivateEndpointConnectionInner. - */ - public static PrivateEndpointConnectionInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateEndpointConnectionInner deserializedPrivateEndpointConnectionInner - = new PrivateEndpointConnectionInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedPrivateEndpointConnectionInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedPrivateEndpointConnectionInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedPrivateEndpointConnectionInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedPrivateEndpointConnectionInner.properties - = PrivateEndpointConnectionProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedPrivateEndpointConnectionInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateEndpointConnectionInner; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/PrivateLinkResourceListResultInner.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/PrivateLinkResourceListResultInner.java deleted file mode 100644 index 4f79affcfb86..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/PrivateLinkResourceListResultInner.java +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.chaos.models.PrivateLinkResource; -import java.io.IOException; -import java.util.List; - -/** - * A list of private link resources. - */ -@Immutable -public final class PrivateLinkResourceListResultInner implements JsonSerializable { - /* - * The PrivateLinkResource items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of PrivateLinkResourceListResultInner class. - */ - private PrivateLinkResourceListResultInner() { - } - - /** - * Get the value property: The PrivateLinkResource items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PrivateLinkResourceListResultInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateLinkResourceListResultInner if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the PrivateLinkResourceListResultInner. - */ - public static PrivateLinkResourceListResultInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateLinkResourceListResultInner deserializedPrivateLinkResourceListResultInner - = new PrivateLinkResourceListResultInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> PrivateLinkResource.fromJson(reader1)); - deserializedPrivateLinkResourceListResultInner.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedPrivateLinkResourceListResultInner.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateLinkResourceListResultInner; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ScenarioConfigurationInner.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ScenarioConfigurationInner.java deleted file mode 100644 index b01e259e58d2..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ScenarioConfigurationInner.java +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.chaos.models.ScenarioConfigurationProperties; -import java.io.IOException; - -/** - * Model that represents the scenario. - */ -@Fluent -public final class ScenarioConfigurationInner extends ProxyResource { - /* - * The properties of scenario definition. - */ - private ScenarioConfigurationProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of ScenarioConfigurationInner class. - */ - public ScenarioConfigurationInner() { - } - - /** - * Get the properties property: The properties of scenario definition. - * - * @return the properties value. - */ - public ScenarioConfigurationProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The properties of scenario definition. - * - * @param properties the properties value to set. - * @return the ScenarioConfigurationInner object itself. - */ - public ScenarioConfigurationInner withProperties(ScenarioConfigurationProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ScenarioConfigurationInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ScenarioConfigurationInner if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ScenarioConfigurationInner. - */ - public static ScenarioConfigurationInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ScenarioConfigurationInner deserializedScenarioConfigurationInner = new ScenarioConfigurationInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedScenarioConfigurationInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedScenarioConfigurationInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedScenarioConfigurationInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedScenarioConfigurationInner.properties - = ScenarioConfigurationProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedScenarioConfigurationInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedScenarioConfigurationInner; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ScenarioInner.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ScenarioInner.java deleted file mode 100644 index 00bf246e8f98..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ScenarioInner.java +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.chaos.models.ScenarioProperties; -import java.io.IOException; - -/** - * Model that represents the scenario. - */ -@Fluent -public final class ScenarioInner extends ProxyResource { - /* - * The properties of scenario. - */ - private ScenarioProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of ScenarioInner class. - */ - public ScenarioInner() { - } - - /** - * Get the properties property: The properties of scenario. - * - * @return the properties value. - */ - public ScenarioProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The properties of scenario. - * - * @param properties the properties value to set. - * @return the ScenarioInner object itself. - */ - public ScenarioInner withProperties(ScenarioProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ScenarioInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ScenarioInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ScenarioInner. - */ - public static ScenarioInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ScenarioInner deserializedScenarioInner = new ScenarioInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedScenarioInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedScenarioInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedScenarioInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedScenarioInner.properties = ScenarioProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedScenarioInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedScenarioInner; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ScenarioRunInner.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ScenarioRunInner.java deleted file mode 100644 index 34ba03b3b7b4..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/ScenarioRunInner.java +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.chaos.models.ScenarioRunProperties; -import java.io.IOException; - -/** - * Model that represents the scenario run. - */ -@Immutable -public final class ScenarioRunInner extends ProxyResource { - /* - * The properties of scenario run. - */ - private ScenarioRunProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of ScenarioRunInner class. - */ - private ScenarioRunInner() { - } - - /** - * Get the properties property: The properties of scenario run. - * - * @return the properties value. - */ - public ScenarioRunProperties properties() { - return this.properties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ScenarioRunInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ScenarioRunInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ScenarioRunInner. - */ - public static ScenarioRunInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ScenarioRunInner deserializedScenarioRunInner = new ScenarioRunInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedScenarioRunInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedScenarioRunInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedScenarioRunInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedScenarioRunInner.properties = ScenarioRunProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedScenarioRunInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedScenarioRunInner; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/WorkspaceInner.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/WorkspaceInner.java deleted file mode 100644 index cfe965d4f4c6..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/fluent/models/WorkspaceInner.java +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.chaos.models.ResourceIdentity; -import com.azure.resourcemanager.chaos.models.WorkspaceProperties; -import java.io.IOException; -import java.util.Map; - -/** - * Model that represents a Workspace resource. - */ -@Fluent -public final class WorkspaceInner extends Resource { - /* - * The managed service identities assigned to this resource. - */ - private ResourceIdentity identity; - - /* - * The properties of the Workspace resource. - */ - private WorkspaceProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of WorkspaceInner class. - */ - public WorkspaceInner() { - } - - /** - * Get the identity property: The managed service identities assigned to this resource. - * - * @return the identity value. - */ - public ResourceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: The managed service identities assigned to this resource. - * - * @param identity the identity value to set. - * @return the WorkspaceInner object itself. - */ - public WorkspaceInner withIdentity(ResourceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the properties property: The properties of the Workspace resource. - * - * @return the properties value. - */ - public WorkspaceProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The properties of the Workspace resource. - * - * @param properties the properties value to set. - * @return the WorkspaceInner object itself. - */ - public WorkspaceInner withProperties(WorkspaceProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public WorkspaceInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public WorkspaceInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", location()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeJsonField("identity", this.identity); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of WorkspaceInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of WorkspaceInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the WorkspaceInner. - */ - public static WorkspaceInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - WorkspaceInner deserializedWorkspaceInner = new WorkspaceInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedWorkspaceInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedWorkspaceInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedWorkspaceInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedWorkspaceInner.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedWorkspaceInner.withTags(tags); - } else if ("properties".equals(fieldName)) { - deserializedWorkspaceInner.properties = WorkspaceProperties.fromJson(reader); - } else if ("identity".equals(fieldName)) { - deserializedWorkspaceInner.identity = ResourceIdentity.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedWorkspaceInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedWorkspaceInner; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ActionImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ActionImpl.java deleted file mode 100644 index d91920084984..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ActionImpl.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.implementation; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.chaos.fluent.models.ActionInner; -import com.azure.resourcemanager.chaos.models.Action; -import com.azure.resourcemanager.chaos.models.ActionKind; -import com.azure.resourcemanager.chaos.models.ActionPropertiesParametersSchema; -import com.azure.resourcemanager.chaos.models.ActionSupportedTargetType; -import java.util.Collections; -import java.util.List; - -public final class ActionImpl implements Action { - private ActionInner innerObject; - - private final com.azure.resourcemanager.chaos.ChaosManager serviceManager; - - ActionImpl(ActionInner innerObject, com.azure.resourcemanager.chaos.ChaosManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String canonicalId() { - return this.innerModel().canonicalId(); - } - - public String displayName() { - return this.innerModel().displayName(); - } - - public String description() { - return this.innerModel().description(); - } - - public String actionName() { - return this.innerModel().actionName(); - } - - public String version() { - return this.innerModel().version(); - } - - public ActionKind actionType() { - return this.innerModel().actionType(); - } - - public List supportedTargetTypes() { - List inner = this.innerModel().supportedTargetTypes(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public ActionPropertiesParametersSchema parametersSchema() { - return this.innerModel().parametersSchema(); - } - - public List recommendedRoles() { - List inner = this.innerModel().recommendedRoles(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public ActionInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.chaos.ChaosManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ActionVersionImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ActionVersionImpl.java deleted file mode 100644 index d785a4de0ee0..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ActionVersionImpl.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.implementation; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.chaos.fluent.models.ActionVersionInner; -import com.azure.resourcemanager.chaos.models.ActionKind; -import com.azure.resourcemanager.chaos.models.ActionPropertiesParametersSchema; -import com.azure.resourcemanager.chaos.models.ActionSupportedTargetType; -import com.azure.resourcemanager.chaos.models.ActionVersion; -import java.util.Collections; -import java.util.List; - -public final class ActionVersionImpl implements ActionVersion { - private ActionVersionInner innerObject; - - private final com.azure.resourcemanager.chaos.ChaosManager serviceManager; - - ActionVersionImpl(ActionVersionInner innerObject, com.azure.resourcemanager.chaos.ChaosManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String canonicalId() { - return this.innerModel().canonicalId(); - } - - public String displayName() { - return this.innerModel().displayName(); - } - - public String description() { - return this.innerModel().description(); - } - - public String actionName() { - return this.innerModel().actionName(); - } - - public String version() { - return this.innerModel().version(); - } - - public ActionKind actionType() { - return this.innerModel().actionType(); - } - - public List supportedTargetTypes() { - List inner = this.innerModel().supportedTargetTypes(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public ActionPropertiesParametersSchema parametersSchema() { - return this.innerModel().parametersSchema(); - } - - public List recommendedRoles() { - List inner = this.innerModel().recommendedRoles(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public ActionVersionInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.chaos.ChaosManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ActionVersionsClientImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ActionVersionsClientImpl.java deleted file mode 100644 index c4035549a0d1..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ActionVersionsClientImpl.java +++ /dev/null @@ -1,388 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.chaos.fluent.ActionVersionsClient; -import com.azure.resourcemanager.chaos.fluent.models.ActionVersionInner; -import com.azure.resourcemanager.chaos.implementation.models.ActionVersionListResult; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ActionVersionsClient. - */ -public final class ActionVersionsClientImpl implements ActionVersionsClient { - /** - * The proxy service used to perform REST calls. - */ - private final ActionVersionsService service; - - /** - * The service client containing this operation class. - */ - private final ChaosManagementClientImpl client; - - /** - * Initializes an instance of ActionVersionsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ActionVersionsClientImpl(ChaosManagementClientImpl client) { - this.service - = RestProxy.create(ActionVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ChaosManagementClientActionVersions to be used by the proxy service - * to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "ChaosManagementClientActionVersions") - public interface ActionVersionsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{location}/actions/{actionName}/versions/{versionName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, @PathParam("actionName") String actionName, - @PathParam("versionName") String versionName, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{location}/actions/{actionName}/versions/{versionName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, @PathParam("actionName") String actionName, - @PathParam("versionName") String versionName, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{location}/actions/{actionName}/versions") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, @PathParam("actionName") String actionName, - @QueryParam("continuationToken") String continuationToken, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{location}/actions/{actionName}/versions") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, @PathParam("actionName") String actionName, - @QueryParam("continuationToken") String continuationToken, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get an Action Version resource for a given location and action. - * - * @param location The name of the Azure region. - * @param actionName String that represents an Action resource name. - * @param versionName String that represents an Action Version 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 an Action Version resource for a given location and action along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String location, String actionName, - String versionName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), location, actionName, versionName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get an Action Version resource for a given location and action. - * - * @param location The name of the Azure region. - * @param actionName String that represents an Action resource name. - * @param versionName String that represents an Action Version 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 an Action Version resource for a given location and action on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String location, String actionName, String versionName) { - return getWithResponseAsync(location, actionName, versionName).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get an Action Version resource for a given location and action. - * - * @param location The name of the Azure region. - * @param actionName String that represents an Action resource name. - * @param versionName String that represents an Action Version 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 an Action Version resource for a given location and action along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String location, String actionName, String versionName, - Context context) { - final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - location, actionName, versionName, accept, context); - } - - /** - * Get an Action Version resource for a given location and action. - * - * @param location The name of the Azure region. - * @param actionName String that represents an Action resource name. - * @param versionName String that represents an Action Version 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 an Action Version resource for a given location and action. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ActionVersionInner get(String location, String actionName, String versionName) { - return getWithResponse(location, actionName, versionName, Context.NONE).getValue(); - } - - /** - * Get a list of Action Version resources for a given location and action. - * - * @param location The name of the Azure region. - * @param actionName String that represents an Action 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 Action Version resources for a given location and action along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String location, String actionName, - String continuationToken) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), location, actionName, 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 Action Version resources for a given location and action. - * - * @param location The name of the Azure region. - * @param actionName String that represents an Action 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 Action Version resources for a given location and action as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String location, String actionName, String continuationToken) { - return new PagedFlux<>(() -> listSinglePageAsync(location, actionName, continuationToken), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Get a list of Action Version resources for a given location and action. - * - * @param location The name of the Azure region. - * @param actionName String that represents an Action 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 Action Version resources for a given location and action as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String location, String actionName) { - final String continuationToken = null; - return new PagedFlux<>(() -> listSinglePageAsync(location, actionName, continuationToken), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Get a list of Action Version resources for a given location and action. - * - * @param location The name of the Azure region. - * @param actionName String that represents an Action 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 Action Version resources for a given location and action along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String location, String actionName, - String continuationToken) { - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), location, actionName, continuationToken, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get a list of Action Version resources for a given location and action. - * - * @param location The name of the Azure region. - * @param actionName String that represents an Action resource name. - * @param continuationToken String that sets the continuation token. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Action Version resources for a given location and action along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String location, String actionName, - String continuationToken, Context context) { - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), location, actionName, continuationToken, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get a list of Action Version resources for a given location and action. - * - * @param location The name of the Azure region. - * @param actionName String that represents an Action 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 Action Version resources for a given location and action as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String location, String actionName) { - final String continuationToken = null; - return new PagedIterable<>(() -> listSinglePage(location, actionName, continuationToken), - nextLink -> listNextSinglePage(nextLink)); - } - - /** - * Get a list of Action Version resources for a given location and action. - * - * @param location The name of the Azure region. - * @param actionName String that represents an Action resource name. - * @param continuationToken String that sets the continuation token. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Action Version resources for a given location and action as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String location, String actionName, String continuationToken, - Context context) { - return new PagedIterable<>(() -> listSinglePage(location, actionName, continuationToken, context), - nextLink -> listNextSinglePage(nextLink, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Action Version resources for a given location and action along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Action Version resources for a given location and action along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return 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. - * @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 Action Version resources for a given location and action along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink, Context context) { - final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); - return 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/ActionVersionsImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ActionVersionsImpl.java deleted file mode 100644 index c08a33fbb5ac..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ActionVersionsImpl.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.chaos.fluent.ActionVersionsClient; -import com.azure.resourcemanager.chaos.fluent.models.ActionVersionInner; -import com.azure.resourcemanager.chaos.models.ActionVersion; -import com.azure.resourcemanager.chaos.models.ActionVersions; - -public final class ActionVersionsImpl implements ActionVersions { - private static final ClientLogger LOGGER = new ClientLogger(ActionVersionsImpl.class); - - private final ActionVersionsClient innerClient; - - private final com.azure.resourcemanager.chaos.ChaosManager serviceManager; - - public ActionVersionsImpl(ActionVersionsClient innerClient, - com.azure.resourcemanager.chaos.ChaosManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getWithResponse(String location, String actionName, String versionName, - Context context) { - Response inner - = this.serviceClient().getWithResponse(location, actionName, versionName, context); - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ActionVersionImpl(inner.getValue(), this.manager())); - } - - public ActionVersion get(String location, String actionName, String versionName) { - ActionVersionInner inner = this.serviceClient().get(location, actionName, versionName); - if (inner != null) { - return new ActionVersionImpl(inner, this.manager()); - } else { - return null; - } - } - - public PagedIterable list(String location, String actionName) { - PagedIterable inner = this.serviceClient().list(location, actionName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ActionVersionImpl(inner1, this.manager())); - } - - public PagedIterable list(String location, String actionName, String continuationToken, - Context context) { - PagedIterable inner - = this.serviceClient().list(location, actionName, continuationToken, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ActionVersionImpl(inner1, this.manager())); - } - - private ActionVersionsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.chaos.ChaosManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ActionsClientImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ActionsClientImpl.java deleted file mode 100644 index 41a07f6b13ca..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ActionsClientImpl.java +++ /dev/null @@ -1,363 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.chaos.fluent.ActionsClient; -import com.azure.resourcemanager.chaos.fluent.models.ActionInner; -import com.azure.resourcemanager.chaos.implementation.models.ActionListResult; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ActionsClient. - */ -public final class ActionsClientImpl implements ActionsClient { - /** - * The proxy service used to perform REST calls. - */ - private final ActionsService service; - - /** - * The service client containing this operation class. - */ - private final ChaosManagementClientImpl client; - - /** - * Initializes an instance of ActionsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ActionsClientImpl(ChaosManagementClientImpl client) { - this.service = RestProxy.create(ActionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ChaosManagementClientActions to be used by the proxy service to - * perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "ChaosManagementClientActions") - public interface ActionsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{location}/actions/{actionName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, @PathParam("actionName") String actionName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{location}/actions/{actionName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, @PathParam("actionName") String actionName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{location}/actions") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, @QueryParam("continuationToken") String continuationToken, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{location}/actions") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, @QueryParam("continuationToken") String continuationToken, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get an Action resource for a given location. - * - * @param location The name of the Azure region. - * @param actionName String that represents an Action 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 an Action resource for a given location along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String location, String actionName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), location, actionName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get an Action resource for a given location. - * - * @param location The name of the Azure region. - * @param actionName String that represents an Action 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 an Action resource for a given location on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String location, String actionName) { - return getWithResponseAsync(location, actionName).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get an Action resource for a given location. - * - * @param location The name of the Azure region. - * @param actionName String that represents an Action 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 an Action resource for a given location along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String location, String actionName, Context context) { - final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - location, actionName, accept, context); - } - - /** - * Get an Action resource for a given location. - * - * @param location The name of the Azure region. - * @param actionName String that represents an Action 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 an Action resource for a given location. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ActionInner get(String location, String actionName) { - return getWithResponse(location, actionName, Context.NONE).getValue(); - } - - /** - * Get a list of Action resources for a given location. - * - * @param location The name of the Azure region. - * @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 Action resources for a given location along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String location, String continuationToken) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), location, 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 Action resources for a given location. - * - * @param location The name of the Azure region. - * @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 Action resources for a given location as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String location, String continuationToken) { - return new PagedFlux<>(() -> listSinglePageAsync(location, continuationToken), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Get a list of Action resources for a given location. - * - * @param location The name of the Azure region. - * @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 Action resources for a given location as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String location) { - final String continuationToken = null; - return new PagedFlux<>(() -> listSinglePageAsync(location, continuationToken), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Get a list of Action resources for a given location. - * - * @param location The name of the Azure region. - * @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 Action resources for a given location along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String location, String continuationToken) { - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), location, continuationToken, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get a list of Action resources for a given location. - * - * @param location The name of the Azure region. - * @param continuationToken String that sets the continuation token. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Action resources for a given location along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String location, String continuationToken, Context context) { - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), location, continuationToken, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get a list of Action resources for a given location. - * - * @param location The name of the Azure region. - * @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 Action resources for a given location as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String location) { - final String continuationToken = null; - return new PagedIterable<>(() -> listSinglePage(location, continuationToken), - nextLink -> listNextSinglePage(nextLink)); - } - - /** - * Get a list of Action resources for a given location. - * - * @param location The name of the Azure region. - * @param continuationToken String that sets the continuation token. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Action resources for a given location as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String location, String continuationToken, Context context) { - return new PagedIterable<>(() -> listSinglePage(location, continuationToken, context), - nextLink -> listNextSinglePage(nextLink, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Action resources for a given location along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Action resources for a given location along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return 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. - * @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 Action resources for a given location along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink, Context context) { - final String accept = "application/json"; - Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); - return 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/ActionsImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ActionsImpl.java deleted file mode 100644 index 5420e2af8238..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ActionsImpl.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.chaos.fluent.ActionsClient; -import com.azure.resourcemanager.chaos.fluent.models.ActionInner; -import com.azure.resourcemanager.chaos.models.Action; -import com.azure.resourcemanager.chaos.models.Actions; - -public final class ActionsImpl implements Actions { - private static final ClientLogger LOGGER = new ClientLogger(ActionsImpl.class); - - private final ActionsClient innerClient; - - private final com.azure.resourcemanager.chaos.ChaosManager serviceManager; - - public ActionsImpl(ActionsClient innerClient, com.azure.resourcemanager.chaos.ChaosManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getWithResponse(String location, String actionName, Context context) { - Response inner = this.serviceClient().getWithResponse(location, actionName, context); - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ActionImpl(inner.getValue(), this.manager())); - } - - public Action get(String location, String actionName) { - ActionInner inner = this.serviceClient().get(location, actionName); - if (inner != null) { - return new ActionImpl(inner, this.manager()); - } else { - return null; - } - } - - public PagedIterable list(String location) { - PagedIterable inner = this.serviceClient().list(location); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ActionImpl(inner1, this.manager())); - } - - public PagedIterable list(String location, String continuationToken, Context context) { - PagedIterable inner = this.serviceClient().list(location, continuationToken, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ActionImpl(inner1, this.manager())); - } - - private ActionsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.chaos.ChaosManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilityImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilityImpl.java index 2a9bab58bd75..40059821e9df 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilityImpl.java +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilityImpl.java @@ -7,7 +7,6 @@ import com.azure.core.management.SystemData; import com.azure.resourcemanager.chaos.fluent.models.CapabilityInner; import com.azure.resourcemanager.chaos.models.Capability; -import com.azure.resourcemanager.chaos.models.ProvisioningState; public final class CapabilityImpl implements Capability { private CapabilityInner innerObject; @@ -55,10 +54,6 @@ public String urn() { return this.innerModel().urn(); } - public ProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - public CapabilityInner innerModel() { return this.innerObject; } 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 1a2c92cb602e..b5a8ee5cd321 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 @@ -26,22 +26,14 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.core.util.serializer.SerializerAdapter; import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.chaos.fluent.ActionVersionsClient; -import com.azure.resourcemanager.chaos.fluent.ActionsClient; import com.azure.resourcemanager.chaos.fluent.CapabilitiesClient; import com.azure.resourcemanager.chaos.fluent.CapabilityTypesClient; import com.azure.resourcemanager.chaos.fluent.ChaosManagementClient; -import com.azure.resourcemanager.chaos.fluent.DiscoveredResourcesClient; import com.azure.resourcemanager.chaos.fluent.ExperimentsClient; import com.azure.resourcemanager.chaos.fluent.OperationStatusesClient; import com.azure.resourcemanager.chaos.fluent.OperationsClient; -import com.azure.resourcemanager.chaos.fluent.PrivateAccessesClient; -import com.azure.resourcemanager.chaos.fluent.ScenarioConfigurationsClient; -import com.azure.resourcemanager.chaos.fluent.ScenarioRunsClient; -import com.azure.resourcemanager.chaos.fluent.ScenariosClient; import com.azure.resourcemanager.chaos.fluent.TargetTypesClient; import com.azure.resourcemanager.chaos.fluent.TargetsClient; -import com.azure.resourcemanager.chaos.fluent.WorkspacesClient; import java.io.IOException; import java.lang.reflect.Type; import java.nio.ByteBuffer; @@ -210,48 +202,6 @@ public ExperimentsClient getExperiments() { return this.experiments; } - /** - * The PrivateAccessesClient object to access its operations. - */ - private final PrivateAccessesClient privateAccesses; - - /** - * Gets the PrivateAccessesClient object to access its operations. - * - * @return the PrivateAccessesClient object. - */ - public PrivateAccessesClient getPrivateAccesses() { - return this.privateAccesses; - } - - /** - * The ActionsClient object to access its operations. - */ - private final ActionsClient actions; - - /** - * Gets the ActionsClient object to access its operations. - * - * @return the ActionsClient object. - */ - public ActionsClient getActions() { - return this.actions; - } - - /** - * The ActionVersionsClient object to access its operations. - */ - private final ActionVersionsClient actionVersions; - - /** - * Gets the ActionVersionsClient object to access its operations. - * - * @return the ActionVersionsClient object. - */ - public ActionVersionsClient getActionVersions() { - return this.actionVersions; - } - /** * The TargetTypesClient object to access its operations. */ @@ -280,76 +230,6 @@ public OperationStatusesClient getOperationStatuses() { return this.operationStatuses; } - /** - * The WorkspacesClient object to access its operations. - */ - private final WorkspacesClient workspaces; - - /** - * Gets the WorkspacesClient object to access its operations. - * - * @return the WorkspacesClient object. - */ - public WorkspacesClient getWorkspaces() { - return this.workspaces; - } - - /** - * The DiscoveredResourcesClient object to access its operations. - */ - private final DiscoveredResourcesClient discoveredResources; - - /** - * Gets the DiscoveredResourcesClient object to access its operations. - * - * @return the DiscoveredResourcesClient object. - */ - public DiscoveredResourcesClient getDiscoveredResources() { - return this.discoveredResources; - } - - /** - * The ScenariosClient object to access its operations. - */ - private final ScenariosClient scenarios; - - /** - * Gets the ScenariosClient object to access its operations. - * - * @return the ScenariosClient object. - */ - public ScenariosClient getScenarios() { - return this.scenarios; - } - - /** - * The ScenarioRunsClient object to access its operations. - */ - private final ScenarioRunsClient scenarioRuns; - - /** - * Gets the ScenarioRunsClient object to access its operations. - * - * @return the ScenarioRunsClient object. - */ - public ScenarioRunsClient getScenarioRuns() { - return this.scenarioRuns; - } - - /** - * The ScenarioConfigurationsClient object to access its operations. - */ - private final ScenarioConfigurationsClient scenarioConfigurations; - - /** - * Gets the ScenarioConfigurationsClient object to access its operations. - * - * @return the ScenarioConfigurationsClient object. - */ - public ScenarioConfigurationsClient getScenarioConfigurations() { - return this.scenarioConfigurations; - } - /** * Initializes an instance of ChaosManagementClient client. * @@ -367,22 +247,14 @@ public ScenarioConfigurationsClient getScenarioConfigurations() { this.defaultPollInterval = defaultPollInterval; this.endpoint = endpoint; this.subscriptionId = subscriptionId; - this.apiVersion = "2026-05-01-preview"; + this.apiVersion = "2025-01-01"; this.capabilities = new CapabilitiesClientImpl(this); this.operations = new OperationsClientImpl(this); this.targets = new TargetsClientImpl(this); this.capabilityTypes = new CapabilityTypesClientImpl(this); this.experiments = new ExperimentsClientImpl(this); - this.privateAccesses = new PrivateAccessesClientImpl(this); - this.actions = new ActionsClientImpl(this); - this.actionVersions = new ActionVersionsClientImpl(this); this.targetTypes = new TargetTypesClientImpl(this); this.operationStatuses = new OperationStatusesClientImpl(this); - this.workspaces = new WorkspacesClientImpl(this); - this.discoveredResources = new DiscoveredResourcesClientImpl(this); - this.scenarios = new ScenariosClientImpl(this); - this.scenarioRuns = new ScenarioRunsClientImpl(this); - this.scenarioConfigurations = new ScenarioConfigurationsClientImpl(this); } /** diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/DiscoveredResourceImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/DiscoveredResourceImpl.java deleted file mode 100644 index 2e501f80a294..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/DiscoveredResourceImpl.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.implementation; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.chaos.fluent.models.DiscoveredResourceInner; -import com.azure.resourcemanager.chaos.models.DiscoveredResource; -import com.azure.resourcemanager.chaos.models.DiscoveredResourceProperties; - -public final class DiscoveredResourceImpl implements DiscoveredResource { - private DiscoveredResourceInner innerObject; - - private final com.azure.resourcemanager.chaos.ChaosManager serviceManager; - - DiscoveredResourceImpl(DiscoveredResourceInner innerObject, - com.azure.resourcemanager.chaos.ChaosManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public DiscoveredResourceProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public DiscoveredResourceInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.chaos.ChaosManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/DiscoveredResourcesClientImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/DiscoveredResourcesClientImpl.java deleted file mode 100644 index b80d74db007e..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/DiscoveredResourcesClientImpl.java +++ /dev/null @@ -1,366 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.chaos.fluent.DiscoveredResourcesClient; -import com.azure.resourcemanager.chaos.fluent.models.DiscoveredResourceInner; -import com.azure.resourcemanager.chaos.implementation.models.DiscoveredResourceListResult; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in DiscoveredResourcesClient. - */ -public final class DiscoveredResourcesClientImpl implements DiscoveredResourcesClient { - /** - * The proxy service used to perform REST calls. - */ - private final DiscoveredResourcesService service; - - /** - * The service client containing this operation class. - */ - private final ChaosManagementClientImpl client; - - /** - * Initializes an instance of DiscoveredResourcesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - DiscoveredResourcesClientImpl(ChaosManagementClientImpl client) { - this.service = RestProxy.create(DiscoveredResourcesService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ChaosManagementClientDiscoveredResources to be used by the proxy - * service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "ChaosManagementClientDiscoveredResources") - public interface DiscoveredResourcesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/discoveredResources/{discoveredResourceName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("discoveredResourceName") String discoveredResourceName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/discoveredResources/{discoveredResourceName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("discoveredResourceName") String discoveredResourceName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/discoveredResources") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByWorkspace(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/discoveredResources") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listByWorkspaceSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByWorkspaceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listByWorkspaceNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get a discovered resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param discoveredResourceName Name of the discovered resource. - * @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 discovered resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String discoveredResourceName) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, discoveredResourceName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a discovered resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param discoveredResourceName Name of the discovered resource. - * @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 discovered resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, - String discoveredResourceName) { - return getWithResponseAsync(resourceGroupName, workspaceName, discoveredResourceName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a discovered resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param discoveredResourceName Name of the discovered resource. - * @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 discovered resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, - String discoveredResourceName, Context context) { - final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, discoveredResourceName, accept, context); - } - - /** - * Get a discovered resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param discoveredResourceName Name of the discovered resource. - * @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 discovered resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DiscoveredResourceInner get(String resourceGroupName, String workspaceName, String discoveredResourceName) { - return getWithResponse(resourceGroupName, workspaceName, discoveredResourceName, Context.NONE).getValue(); - } - - /** - * Get a list of discovered resources for a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace 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 discovered resources for a workspace along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByWorkspaceSinglePageAsync(String resourceGroupName, - String workspaceName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByWorkspace(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, 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 discovered resources for a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace 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 discovered resources for a workspace as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByWorkspaceAsync(String resourceGroupName, String workspaceName) { - return new PagedFlux<>(() -> listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName), - nextLink -> listByWorkspaceNextSinglePageAsync(nextLink)); - } - - /** - * Get a list of discovered resources for a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace 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 discovered resources for a workspace along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByWorkspaceSinglePage(String resourceGroupName, - String workspaceName) { - final String accept = "application/json"; - Response res - = service.listByWorkspaceSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get a list of discovered resources for a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of discovered resources for a workspace along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByWorkspaceSinglePage(String resourceGroupName, - String workspaceName, Context context) { - final String accept = "application/json"; - Response res - = service.listByWorkspaceSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get a list of discovered resources for a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace 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 discovered resources for a workspace as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName) { - return new PagedIterable<>(() -> listByWorkspaceSinglePage(resourceGroupName, workspaceName), - nextLink -> listByWorkspaceNextSinglePage(nextLink)); - } - - /** - * Get a list of discovered resources for a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of discovered resources for a workspace as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName, - Context context) { - return new PagedIterable<>(() -> listByWorkspaceSinglePage(resourceGroupName, workspaceName, context), - nextLink -> listByWorkspaceNextSinglePage(nextLink, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of discovered resources for a workspace along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByWorkspaceNextSinglePageAsync(String nextLink) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByWorkspaceNext(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. - * @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 discovered resources for a workspace along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByWorkspaceNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listByWorkspaceNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return 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. - * @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 discovered resources for a workspace along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByWorkspaceNextSinglePage(String nextLink, Context context) { - final String accept = "application/json"; - Response res - = service.listByWorkspaceNextSync(nextLink, this.client.getEndpoint(), accept, context); - return 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/DiscoveredResourcesImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/DiscoveredResourcesImpl.java deleted file mode 100644 index a7d58195d0ff..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/DiscoveredResourcesImpl.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.chaos.fluent.DiscoveredResourcesClient; -import com.azure.resourcemanager.chaos.fluent.models.DiscoveredResourceInner; -import com.azure.resourcemanager.chaos.models.DiscoveredResource; -import com.azure.resourcemanager.chaos.models.DiscoveredResources; - -public final class DiscoveredResourcesImpl implements DiscoveredResources { - private static final ClientLogger LOGGER = new ClientLogger(DiscoveredResourcesImpl.class); - - private final DiscoveredResourcesClient innerClient; - - private final com.azure.resourcemanager.chaos.ChaosManager serviceManager; - - public DiscoveredResourcesImpl(DiscoveredResourcesClient innerClient, - com.azure.resourcemanager.chaos.ChaosManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getWithResponse(String resourceGroupName, String workspaceName, - String discoveredResourceName, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, discoveredResourceName, context); - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new DiscoveredResourceImpl(inner.getValue(), this.manager())); - } - - public DiscoveredResource get(String resourceGroupName, String workspaceName, String discoveredResourceName) { - DiscoveredResourceInner inner - = this.serviceClient().get(resourceGroupName, workspaceName, discoveredResourceName); - if (inner != null) { - return new DiscoveredResourceImpl(inner, this.manager()); - } else { - return null; - } - } - - public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName) { - PagedIterable inner - = this.serviceClient().listByWorkspace(resourceGroupName, workspaceName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DiscoveredResourceImpl(inner1, this.manager())); - } - - public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName, - Context context) { - PagedIterable inner - = this.serviceClient().listByWorkspace(resourceGroupName, workspaceName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DiscoveredResourceImpl(inner1, this.manager())); - } - - private DiscoveredResourcesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.chaos.ChaosManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentExecutionDetailsImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentExecutionDetailsImpl.java index 1a95fa3bdb00..6b18b4730ecb 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 @@ -7,7 +7,6 @@ import com.azure.resourcemanager.chaos.fluent.models.ExperimentExecutionDetailsInner; import com.azure.resourcemanager.chaos.models.ExperimentExecutionDetails; import com.azure.resourcemanager.chaos.models.ExperimentExecutionDetailsPropertiesRunInformation; -import com.azure.resourcemanager.chaos.models.ProvisioningState; import java.time.OffsetDateTime; public final class ExperimentExecutionDetailsImpl implements ExperimentExecutionDetails { @@ -45,10 +44,6 @@ public OffsetDateTime stoppedAt() { return this.innerModel().stoppedAt(); } - public ProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - public String failureReason() { return this.innerModel().failureReason(); } 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 764d2aecc10f..14192a344337 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 @@ -7,7 +7,6 @@ import com.azure.core.management.SystemData; import com.azure.resourcemanager.chaos.fluent.models.ExperimentExecutionInner; import com.azure.resourcemanager.chaos.models.ExperimentExecution; -import com.azure.resourcemanager.chaos.models.ProvisioningState; import java.time.OffsetDateTime; public final class ExperimentExecutionImpl implements ExperimentExecution { @@ -49,10 +48,6 @@ public OffsetDateTime stoppedAt() { return this.innerModel().stoppedAt(); } - public ProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - public ExperimentExecutionInner innerModel() { return this.innerObject; } 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 ec59c3b12dc1..4c213f401604 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 @@ -10,7 +10,6 @@ import com.azure.resourcemanager.chaos.fluent.models.ExperimentInner; import com.azure.resourcemanager.chaos.models.ChaosExperimentStep; import com.azure.resourcemanager.chaos.models.ChaosTargetSelector; -import com.azure.resourcemanager.chaos.models.CustomerDataStorageProperties; import com.azure.resourcemanager.chaos.models.Experiment; import com.azure.resourcemanager.chaos.models.ExperimentUpdate; import com.azure.resourcemanager.chaos.models.ProvisioningState; @@ -79,10 +78,6 @@ public List selectors() { } } - public CustomerDataStorageProperties customerDataStorage() { - return this.innerModel().customerDataStorage(); - } - public Region region() { return Region.fromName(this.regionName()); } @@ -232,11 +227,6 @@ public ExperimentImpl withIdentity(ResourceIdentity identity) { } } - public ExperimentImpl withCustomerDataStorage(CustomerDataStorageProperties customerDataStorage) { - this.innerModel().withCustomerDataStorage(customerDataStorage); - return this; - } - private boolean isInCreateMode() { return this.innerModel() == null || this.innerModel().id() == null; } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/PrivateAccessImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/PrivateAccessImpl.java deleted file mode 100644 index a5a734ea7f38..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/PrivateAccessImpl.java +++ /dev/null @@ -1,176 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.implementation; - -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.chaos.fluent.models.PrivateAccessInner; -import com.azure.resourcemanager.chaos.models.PrivateAccess; -import com.azure.resourcemanager.chaos.models.PrivateAccessPatch; -import com.azure.resourcemanager.chaos.models.PrivateAccessProperties; -import java.util.Collections; -import java.util.Map; - -public final class PrivateAccessImpl implements PrivateAccess, PrivateAccess.Definition, PrivateAccess.Update { - private PrivateAccessInner innerObject; - - private final com.azure.resourcemanager.chaos.ChaosManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String location() { - return this.innerModel().location(); - } - - public Map tags() { - Map inner = this.innerModel().tags(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public PrivateAccessProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public PrivateAccessInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.chaos.ChaosManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String privateAccessName; - - private PrivateAccessPatch updateProperties; - - public PrivateAccessImpl withExistingResourceGroup(String resourceGroupName) { - this.resourceGroupName = resourceGroupName; - return this; - } - - public PrivateAccess create() { - this.innerObject = serviceManager.serviceClient() - .getPrivateAccesses() - .createOrUpdate(resourceGroupName, privateAccessName, this.innerModel(), Context.NONE); - return this; - } - - public PrivateAccess create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getPrivateAccesses() - .createOrUpdate(resourceGroupName, privateAccessName, this.innerModel(), context); - return this; - } - - PrivateAccessImpl(String name, com.azure.resourcemanager.chaos.ChaosManager serviceManager) { - this.innerObject = new PrivateAccessInner(); - this.serviceManager = serviceManager; - this.privateAccessName = name; - } - - public PrivateAccessImpl update() { - this.updateProperties = new PrivateAccessPatch(); - return this; - } - - public PrivateAccess apply() { - this.innerObject = serviceManager.serviceClient() - .getPrivateAccesses() - .update(resourceGroupName, privateAccessName, updateProperties, Context.NONE); - return this; - } - - public PrivateAccess apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getPrivateAccesses() - .update(resourceGroupName, privateAccessName, updateProperties, context); - return this; - } - - PrivateAccessImpl(PrivateAccessInner innerObject, com.azure.resourcemanager.chaos.ChaosManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.privateAccessName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateAccesses"); - } - - public PrivateAccess refresh() { - this.innerObject = serviceManager.serviceClient() - .getPrivateAccesses() - .getByResourceGroupWithResponse(resourceGroupName, privateAccessName, Context.NONE) - .getValue(); - return this; - } - - public PrivateAccess refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getPrivateAccesses() - .getByResourceGroupWithResponse(resourceGroupName, privateAccessName, context) - .getValue(); - return this; - } - - public PrivateAccessImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public PrivateAccessImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public PrivateAccessImpl withProperties(PrivateAccessProperties properties) { - this.innerModel().withProperties(properties); - return this; - } - - public PrivateAccessImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateProperties.withTags(tags); - return this; - } - } - - private boolean isInCreateMode() { - return this.innerModel() == null || this.innerModel().id() == null; - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/PrivateAccessesClientImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/PrivateAccessesClientImpl.java deleted file mode 100644 index 87fa6ea890ad..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/PrivateAccessesClientImpl.java +++ /dev/null @@ -1,1830 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.BinaryData; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.chaos.fluent.PrivateAccessesClient; -import com.azure.resourcemanager.chaos.fluent.models.PrivateAccessInner; -import com.azure.resourcemanager.chaos.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.chaos.fluent.models.PrivateLinkResourceListResultInner; -import com.azure.resourcemanager.chaos.implementation.models.PrivateAccessListResult; -import com.azure.resourcemanager.chaos.implementation.models.PrivateEndpointConnectionListResult; -import com.azure.resourcemanager.chaos.models.PrivateAccessPatch; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in PrivateAccessesClient. - */ -public final class PrivateAccessesClientImpl implements PrivateAccessesClient { - /** - * The proxy service used to perform REST calls. - */ - private final PrivateAccessesService service; - - /** - * The service client containing this operation class. - */ - private final ChaosManagementClientImpl client; - - /** - * Initializes an instance of PrivateAccessesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - PrivateAccessesClientImpl(ChaosManagementClientImpl client) { - this.service - = RestProxy.create(PrivateAccessesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ChaosManagementClientPrivateAccesses to be used by the proxy service - * to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "ChaosManagementClientPrivateAccesses") - public interface PrivateAccessesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/privateAccesses/{privateAccessName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateAccessName") String privateAccessName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/privateAccesses/{privateAccessName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateAccessName") String privateAccessName, @HeaderParam("Accept") String accept, - Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/privateAccesses/{privateAccessName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateAccessName") String privateAccessName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") PrivateAccessInner resource, - Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/privateAccesses/{privateAccessName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateAccessName") String privateAccessName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") PrivateAccessInner resource, - Context context); - - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/privateAccesses/{privateAccessName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateAccessName") String privateAccessName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") PrivateAccessPatch properties, - Context context); - - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/privateAccesses/{privateAccessName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateAccessName") String privateAccessName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") PrivateAccessPatch properties, - Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/privateAccesses/{privateAccessName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateAccessName") String privateAccessName, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/privateAccesses/{privateAccessName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateAccessName") String privateAccessName, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/privateAccesses") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("continuationToken") String continuationToken, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/privateAccesses") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("continuationToken") String continuationToken, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/privateAccesses") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("continuationToken") String continuationToken, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/privateAccesses") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("continuationToken") String continuationToken, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/privateAccesses/{privateAccessName}/privateLinkResources") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getPrivateLinkResources( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateAccessName") String privateAccessName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/privateAccesses/{privateAccessName}/privateLinkResources") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response getPrivateLinkResourcesSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateAccessName") String privateAccessName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/privateAccesses/{privateAccessName}/privateEndpointConnections/{privateEndpointConnectionName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getAPrivateEndpointConnection( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateAccessName") String privateAccessName, - @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/privateAccesses/{privateAccessName}/privateEndpointConnections/{privateEndpointConnectionName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response getAPrivateEndpointConnectionSync( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateAccessName") String privateAccessName, - @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/privateAccesses/{privateAccessName}/privateEndpointConnections/{privateEndpointConnectionName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> deleteAPrivateEndpointConnection(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateAccessName") String privateAccessName, - @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/privateAccesses/{privateAccessName}/privateEndpointConnections/{privateEndpointConnectionName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteAPrivateEndpointConnectionSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateAccessName") String privateAccessName, - @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/privateAccesses/{privateAccessName}/privateEndpointConnections") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listPrivateEndpointConnections( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateAccessName") String privateAccessName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/privateAccesses/{privateAccessName}/privateEndpointConnections") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listPrivateEndpointConnectionsSync( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateAccessName") String privateAccessName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listAllNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listAllNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listPrivateEndpointConnectionsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listPrivateEndpointConnectionsNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get a private access resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @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 private access resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String privateAccessName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateAccessName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a private access resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @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 private access resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String privateAccessName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, privateAccessName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a private access resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @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 private access resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, - String privateAccessName, Context context) { - final String accept = "application/json"; - return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateAccessName, accept, context); - } - - /** - * Get a private access resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @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 private access resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateAccessInner getByResourceGroup(String resourceGroupName, String privateAccessName) { - return getByResourceGroupWithResponse(resourceGroupName, privateAccessName, Context.NONE).getValue(); - } - - /** - * Create or update a private access. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param resource private access resource to be created or updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return privateAccesses tracked resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String privateAccessName, PrivateAccessInner resource) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateAccessName, contentType, accept, resource, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update a private access. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param resource private access resource to be created or updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return privateAccesses tracked resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String privateAccessName, - PrivateAccessInner resource) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateAccessName, contentType, accept, resource, - Context.NONE); - } - - /** - * Create or update a private access. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param resource private access resource to be created or updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return privateAccesses tracked resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String privateAccessName, - PrivateAccessInner resource, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateAccessName, contentType, accept, resource, - context); - } - - /** - * Create or update a private access. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param resource private access resource to be created or updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of privateAccesses tracked resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, PrivateAccessInner> - beginCreateOrUpdateAsync(String resourceGroupName, String privateAccessName, PrivateAccessInner resource) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, privateAccessName, resource); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - PrivateAccessInner.class, PrivateAccessInner.class, this.client.getContext()); - } - - /** - * Create or update a private access. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param resource private access resource to be created or updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of privateAccesses tracked resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, PrivateAccessInner> beginCreateOrUpdate(String resourceGroupName, - String privateAccessName, PrivateAccessInner resource) { - Response response = createOrUpdateWithResponse(resourceGroupName, privateAccessName, resource); - return this.client.getLroResult(response, PrivateAccessInner.class, - PrivateAccessInner.class, Context.NONE); - } - - /** - * Create or update a private access. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param resource private access resource to be created or updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of privateAccesses tracked resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, PrivateAccessInner> beginCreateOrUpdate(String resourceGroupName, - String privateAccessName, PrivateAccessInner resource, Context context) { - Response response - = createOrUpdateWithResponse(resourceGroupName, privateAccessName, resource, context); - return this.client.getLroResult(response, PrivateAccessInner.class, - PrivateAccessInner.class, context); - } - - /** - * Create or update a private access. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param resource private access resource to be created or updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return privateAccesses tracked resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String privateAccessName, - PrivateAccessInner resource) { - return beginCreateOrUpdateAsync(resourceGroupName, privateAccessName, resource).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update a private access. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param resource private access resource to be created or updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return privateAccesses tracked resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateAccessInner createOrUpdate(String resourceGroupName, String privateAccessName, - PrivateAccessInner resource) { - return beginCreateOrUpdate(resourceGroupName, privateAccessName, resource).getFinalResult(); - } - - /** - * Create or update a private access. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param resource private access resource to be created or updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return privateAccesses tracked resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateAccessInner createOrUpdate(String resourceGroupName, String privateAccessName, - PrivateAccessInner resource, Context context) { - return beginCreateOrUpdate(resourceGroupName, privateAccessName, resource, context).getFinalResult(); - } - - /** - * Patch a private access tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param properties private access resource's tags to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return privateAccesses tracked resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String privateAccessName, - PrivateAccessPatch properties) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateAccessName, contentType, accept, properties, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Patch a private access tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param properties private access resource's tags to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return privateAccesses tracked resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String privateAccessName, - PrivateAccessPatch properties) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateAccessName, contentType, accept, properties, - Context.NONE); - } - - /** - * Patch a private access tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param properties private access resource's tags to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return privateAccesses tracked resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String privateAccessName, - PrivateAccessPatch properties, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateAccessName, contentType, accept, properties, - context); - } - - /** - * Patch a private access tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param properties private access resource's tags to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of privateAccesses tracked resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, PrivateAccessInner> beginUpdateAsync(String resourceGroupName, - String privateAccessName, PrivateAccessPatch properties) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, privateAccessName, properties); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - PrivateAccessInner.class, PrivateAccessInner.class, this.client.getContext()); - } - - /** - * Patch a private access tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param properties private access resource's tags to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of privateAccesses tracked resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, PrivateAccessInner> beginUpdate(String resourceGroupName, - String privateAccessName, PrivateAccessPatch properties) { - Response response = updateWithResponse(resourceGroupName, privateAccessName, properties); - return this.client.getLroResult(response, PrivateAccessInner.class, - PrivateAccessInner.class, Context.NONE); - } - - /** - * Patch a private access tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param properties private access resource's tags to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of privateAccesses tracked resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, PrivateAccessInner> beginUpdate(String resourceGroupName, - String privateAccessName, PrivateAccessPatch properties, Context context) { - Response response = updateWithResponse(resourceGroupName, privateAccessName, properties, context); - return this.client.getLroResult(response, PrivateAccessInner.class, - PrivateAccessInner.class, context); - } - - /** - * Patch a private access tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param properties private access resource's tags to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return privateAccesses tracked resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String privateAccessName, - PrivateAccessPatch properties) { - return beginUpdateAsync(resourceGroupName, privateAccessName, properties).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Patch a private access tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param properties private access resource's tags to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return privateAccesses tracked resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateAccessInner update(String resourceGroupName, String privateAccessName, - PrivateAccessPatch properties) { - return beginUpdate(resourceGroupName, privateAccessName, properties).getFinalResult(); - } - - /** - * Patch a private access tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param properties private access resource's tags to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return privateAccesses tracked resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateAccessInner update(String resourceGroupName, String privateAccessName, PrivateAccessPatch properties, - Context context) { - return beginUpdate(resourceGroupName, privateAccessName, properties, context).getFinalResult(); - } - - /** - * Delete a private access. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String privateAccessName) { - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateAccessName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a private access. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String privateAccessName) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateAccessName, Context.NONE); - } - - /** - * Delete a private access. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String privateAccessName, - Context context) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateAccessName, context); - } - - /** - * Delete a private access. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String privateAccessName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, privateAccessName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete a private access. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String privateAccessName) { - Response response = deleteWithResponse(resourceGroupName, privateAccessName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); - } - - /** - * Delete a private access. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String privateAccessName, - Context context) { - Response response = deleteWithResponse(resourceGroupName, privateAccessName, context); - return this.client.getLroResult(response, Void.class, Void.class, context); - } - - /** - * Delete a private access. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String privateAccessName) { - return beginDeleteAsync(resourceGroupName, privateAccessName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a private access. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String privateAccessName) { - beginDelete(resourceGroupName, privateAccessName).getFinalResult(); - } - - /** - * Delete a private access. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String privateAccessName, Context context) { - beginDelete(resourceGroupName, privateAccessName, context).getFinalResult(); - } - - /** - * Get a list of private access resources in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 private access resources in a resource group along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - String continuationToken) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, 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 private access resources in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 private access resources in a resource group as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, String continuationToken) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, continuationToken), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Get a list of private access resources in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private access resources in a resource group as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - final String continuationToken = null; - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, continuationToken), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Get a list of private access resources in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 private access resources in a resource group along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, - String continuationToken) { - final String accept = "application/json"; - Response res - = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, continuationToken, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get a list of private access resources in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 private access resources in a resource group along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, - String continuationToken, Context context) { - final String accept = "application/json"; - Response res - = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, continuationToken, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get a list of private access resources in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private access resources in a resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - final String continuationToken = null; - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, continuationToken), - nextLink -> listNextSinglePage(nextLink)); - } - - /** - * Get a list of private access resources in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 private access resources in a resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, String continuationToken, - Context context) { - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, continuationToken, context), - nextLink -> listNextSinglePage(nextLink, context)); - } - - /** - * Get a list of private access resources in a subscription. - * - * @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 private access resources in a subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String continuationToken) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), 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 private access resources in a subscription. - * - * @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 private access resources in a subscription as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String continuationToken) { - return new PagedFlux<>(() -> listSinglePageAsync(continuationToken), - nextLink -> listAllNextSinglePageAsync(nextLink)); - } - - /** - * Get a list of private access 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 private access resources in a subscription as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - final String continuationToken = null; - return new PagedFlux<>(() -> listSinglePageAsync(continuationToken), - nextLink -> listAllNextSinglePageAsync(nextLink)); - } - - /** - * Get a list of private access resources in a subscription. - * - * @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 private access resources in a subscription along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String continuationToken) { - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), continuationToken, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get a list of private access resources in a subscription. - * - * @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 private access resources in a subscription along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String continuationToken, Context context) { - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), continuationToken, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get a list of private access 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 private access resources in a subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - final String continuationToken = null; - return new PagedIterable<>(() -> listSinglePage(continuationToken), - nextLink -> listAllNextSinglePage(nextLink)); - } - - /** - * Get a list of private access resources in a subscription. - * - * @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 private access resources in a subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String continuationToken, Context context) { - return new PagedIterable<>(() -> listSinglePage(continuationToken, context), - nextLink -> listAllNextSinglePage(nextLink, context)); - } - - /** - * Gets the private link resources possible under private access resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @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 private link resources possible under private access resource along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - getPrivateLinkResourcesWithResponseAsync(String resourceGroupName, String privateAccessName) { - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.getPrivateLinkResources(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateAccessName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the private link resources possible under private access resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @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 private link resources possible under private access resource on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getPrivateLinkResourcesAsync(String resourceGroupName, - String privateAccessName) { - return getPrivateLinkResourcesWithResponseAsync(resourceGroupName, privateAccessName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the private link resources possible under private access resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @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 private link resources possible under private access resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getPrivateLinkResourcesWithResponse(String resourceGroupName, - String privateAccessName, Context context) { - final String accept = "application/json"; - return service.getPrivateLinkResourcesSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateAccessName, accept, context); - } - - /** - * Gets the private link resources possible under private access resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @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 private link resources possible under private access resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateLinkResourceListResultInner getPrivateLinkResources(String resourceGroupName, - String privateAccessName) { - return getPrivateLinkResourcesWithResponse(resourceGroupName, privateAccessName, Context.NONE).getValue(); - } - - /** - * Gets information about a private endpoint connection under a private access resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 information about a private endpoint connection under a private access resource along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getAPrivateEndpointConnectionWithResponseAsync( - String resourceGroupName, String privateAccessName, String privateEndpointConnectionName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getAPrivateEndpointConnection(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateAccessName, - privateEndpointConnectionName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets information about a private endpoint connection under a private access resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 information about a private endpoint connection under a private access resource on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAPrivateEndpointConnectionAsync(String resourceGroupName, - String privateAccessName, String privateEndpointConnectionName) { - return getAPrivateEndpointConnectionWithResponseAsync(resourceGroupName, privateAccessName, - privateEndpointConnectionName).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets information about a private endpoint connection under a private access resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 information about a private endpoint connection under a private access resource along with - * {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getAPrivateEndpointConnectionWithResponse(String resourceGroupName, - String privateAccessName, String privateEndpointConnectionName, Context context) { - final String accept = "application/json"; - return service.getAPrivateEndpointConnectionSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateAccessName, privateEndpointConnectionName, - accept, context); - } - - /** - * Gets information about a private endpoint connection under a private access resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 information about a private endpoint connection under a private access resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionInner getAPrivateEndpointConnection(String resourceGroupName, - String privateAccessName, String privateEndpointConnectionName) { - return getAPrivateEndpointConnectionWithResponse(resourceGroupName, privateAccessName, - privateEndpointConnectionName, Context.NONE).getValue(); - } - - /** - * Deletes a private endpoint connection under a private access resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteAPrivateEndpointConnectionWithResponseAsync(String resourceGroupName, - String privateAccessName, String privateEndpointConnectionName) { - return FluxUtil - .withContext(context -> service.deleteAPrivateEndpointConnection(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateAccessName, - privateEndpointConnectionName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes a private endpoint connection under a private access resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteAPrivateEndpointConnectionWithResponse(String resourceGroupName, - String privateAccessName, String privateEndpointConnectionName) { - return service.deleteAPrivateEndpointConnectionSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateAccessName, privateEndpointConnectionName, - Context.NONE); - } - - /** - * Deletes a private endpoint connection under a private access resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteAPrivateEndpointConnectionWithResponse(String resourceGroupName, - String privateAccessName, String privateEndpointConnectionName, Context context) { - return service.deleteAPrivateEndpointConnectionSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateAccessName, privateEndpointConnectionName, - context); - } - - /** - * Deletes a private endpoint connection under a private access resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAPrivateEndpointConnectionAsync(String resourceGroupName, - String privateAccessName, String privateEndpointConnectionName) { - Mono>> mono = deleteAPrivateEndpointConnectionWithResponseAsync(resourceGroupName, - privateAccessName, privateEndpointConnectionName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Deletes a private endpoint connection under a private access resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeleteAPrivateEndpointConnection(String resourceGroupName, - String privateAccessName, String privateEndpointConnectionName) { - Response response = deleteAPrivateEndpointConnectionWithResponse(resourceGroupName, - privateAccessName, privateEndpointConnectionName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); - } - - /** - * Deletes a private endpoint connection under a private access resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeleteAPrivateEndpointConnection(String resourceGroupName, - String privateAccessName, String privateEndpointConnectionName, Context context) { - Response response = deleteAPrivateEndpointConnectionWithResponse(resourceGroupName, - privateAccessName, privateEndpointConnectionName, context); - return this.client.getLroResult(response, Void.class, Void.class, context); - } - - /** - * Deletes a private endpoint connection under a private access resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAPrivateEndpointConnectionAsync(String resourceGroupName, String privateAccessName, - String privateEndpointConnectionName) { - return beginDeleteAPrivateEndpointConnectionAsync(resourceGroupName, privateAccessName, - privateEndpointConnectionName).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a private endpoint connection under a private access resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteAPrivateEndpointConnection(String resourceGroupName, String privateAccessName, - String privateEndpointConnectionName) { - beginDeleteAPrivateEndpointConnection(resourceGroupName, privateAccessName, privateEndpointConnectionName) - .getFinalResult(); - } - - /** - * Deletes a private endpoint connection under a private access resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteAPrivateEndpointConnection(String resourceGroupName, String privateAccessName, - String privateEndpointConnectionName, Context context) { - beginDeleteAPrivateEndpointConnection(resourceGroupName, privateAccessName, privateEndpointConnectionName, - context).getFinalResult(); - } - - /** - * List information about private endpoint connections under a private access resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @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 private link resources along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listPrivateEndpointConnectionsSinglePageAsync(String resourceGroupName, String privateAccessName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listPrivateEndpointConnections(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateAccessName, - 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())); - } - - /** - * List information about private endpoint connections under a private access resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @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 private link resources as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listPrivateEndpointConnectionsAsync(String resourceGroupName, - String privateAccessName) { - return new PagedFlux<>( - () -> listPrivateEndpointConnectionsSinglePageAsync(resourceGroupName, privateAccessName), - nextLink -> listPrivateEndpointConnectionsNextSinglePageAsync(nextLink)); - } - - /** - * List information about private endpoint connections under a private access resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @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 private link resources along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse - listPrivateEndpointConnectionsSinglePage(String resourceGroupName, String privateAccessName) { - final String accept = "application/json"; - Response res - = service.listPrivateEndpointConnectionsSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateAccessName, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List information about private endpoint connections under a private access resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @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 private link resources along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse - listPrivateEndpointConnectionsSinglePage(String resourceGroupName, String privateAccessName, Context context) { - final String accept = "application/json"; - Response res - = service.listPrivateEndpointConnectionsSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateAccessName, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List information about private endpoint connections under a private access resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @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 private link resources as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listPrivateEndpointConnections(String resourceGroupName, - String privateAccessName) { - return new PagedIterable<>(() -> listPrivateEndpointConnectionsSinglePage(resourceGroupName, privateAccessName), - nextLink -> listPrivateEndpointConnectionsNextSinglePage(nextLink)); - } - - /** - * List information about private endpoint connections under a private access resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @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 private link resources as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listPrivateEndpointConnections(String resourceGroupName, - String privateAccessName, Context context) { - return new PagedIterable<>( - () -> listPrivateEndpointConnectionsSinglePage(resourceGroupName, privateAccessName, context), - nextLink -> listPrivateEndpointConnectionsNextSinglePage(nextLink, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private access resources in a resource group along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private access resources in a resource group along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return 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. - * @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 private access resources in a resource group along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink, Context context) { - final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); - return 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. - * @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 private access resources in a subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listAllNextSinglePageAsync(String nextLink) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listAllNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private access resources in a subscription along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listAllNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listAllNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return 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. - * @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 private access resources in a subscription along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listAllNextSinglePage(String nextLink, Context context) { - final String accept = "application/json"; - Response res - = service.listAllNextSync(nextLink, this.client.getEndpoint(), accept, context); - return 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. - * @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 private link resources along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listPrivateEndpointConnectionsNextSinglePageAsync(String nextLink) { - final String accept = "application/json"; - return FluxUtil.withContext( - context -> service.listPrivateEndpointConnectionsNext(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. - * @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 private link resources along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse - listPrivateEndpointConnectionsNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listPrivateEndpointConnectionsNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return 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. - * @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 private link resources along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listPrivateEndpointConnectionsNextSinglePage(String nextLink, - Context context) { - final String accept = "application/json"; - Response res - = service.listPrivateEndpointConnectionsNextSync(nextLink, this.client.getEndpoint(), accept, context); - return 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/PrivateAccessesImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/PrivateAccessesImpl.java deleted file mode 100644 index 0b5091ac1cf6..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/PrivateAccessesImpl.java +++ /dev/null @@ -1,213 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.chaos.fluent.PrivateAccessesClient; -import com.azure.resourcemanager.chaos.fluent.models.PrivateAccessInner; -import com.azure.resourcemanager.chaos.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.chaos.fluent.models.PrivateLinkResourceListResultInner; -import com.azure.resourcemanager.chaos.models.PrivateAccess; -import com.azure.resourcemanager.chaos.models.PrivateAccesses; -import com.azure.resourcemanager.chaos.models.PrivateEndpointConnection; -import com.azure.resourcemanager.chaos.models.PrivateLinkResourceListResult; - -public final class PrivateAccessesImpl implements PrivateAccesses { - private static final ClientLogger LOGGER = new ClientLogger(PrivateAccessesImpl.class); - - private final PrivateAccessesClient innerClient; - - private final com.azure.resourcemanager.chaos.ChaosManager serviceManager; - - public PrivateAccessesImpl(PrivateAccessesClient innerClient, - com.azure.resourcemanager.chaos.ChaosManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getByResourceGroupWithResponse(String resourceGroupName, String privateAccessName, - Context context) { - Response inner - = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, privateAccessName, context); - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new PrivateAccessImpl(inner.getValue(), this.manager())); - } - - public PrivateAccess getByResourceGroup(String resourceGroupName, String privateAccessName) { - PrivateAccessInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, privateAccessName); - if (inner != null) { - return new PrivateAccessImpl(inner, this.manager()); - } else { - return null; - } - } - - public void deleteByResourceGroup(String resourceGroupName, String privateAccessName) { - this.serviceClient().delete(resourceGroupName, privateAccessName); - } - - public void delete(String resourceGroupName, String privateAccessName, Context context) { - this.serviceClient().delete(resourceGroupName, privateAccessName, context); - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateAccessImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, String continuationToken, - Context context) { - PagedIterable inner - = this.serviceClient().listByResourceGroup(resourceGroupName, continuationToken, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateAccessImpl(inner1, this.manager())); - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateAccessImpl(inner1, this.manager())); - } - - public PagedIterable list(String continuationToken, Context context) { - PagedIterable inner = this.serviceClient().list(continuationToken, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateAccessImpl(inner1, this.manager())); - } - - public Response getPrivateLinkResourcesWithResponse(String resourceGroupName, - String privateAccessName, Context context) { - Response inner - = this.serviceClient().getPrivateLinkResourcesWithResponse(resourceGroupName, privateAccessName, context); - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new PrivateLinkResourceListResultImpl(inner.getValue(), this.manager())); - } - - public PrivateLinkResourceListResult getPrivateLinkResources(String resourceGroupName, String privateAccessName) { - PrivateLinkResourceListResultInner inner - = this.serviceClient().getPrivateLinkResources(resourceGroupName, privateAccessName); - if (inner != null) { - return new PrivateLinkResourceListResultImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getAPrivateEndpointConnectionWithResponse(String resourceGroupName, - String privateAccessName, String privateEndpointConnectionName, Context context) { - Response inner = this.serviceClient() - .getAPrivateEndpointConnectionWithResponse(resourceGroupName, privateAccessName, - privateEndpointConnectionName, context); - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new PrivateEndpointConnectionImpl(inner.getValue(), this.manager())); - } - - public PrivateEndpointConnection getAPrivateEndpointConnection(String resourceGroupName, String privateAccessName, - String privateEndpointConnectionName) { - PrivateEndpointConnectionInner inner = this.serviceClient() - .getAPrivateEndpointConnection(resourceGroupName, privateAccessName, privateEndpointConnectionName); - if (inner != null) { - return new PrivateEndpointConnectionImpl(inner, this.manager()); - } else { - return null; - } - } - - public void deleteAPrivateEndpointConnection(String resourceGroupName, String privateAccessName, - String privateEndpointConnectionName) { - this.serviceClient() - .deleteAPrivateEndpointConnection(resourceGroupName, privateAccessName, privateEndpointConnectionName); - } - - public void deleteAPrivateEndpointConnection(String resourceGroupName, String privateAccessName, - String privateEndpointConnectionName, Context context) { - this.serviceClient() - .deleteAPrivateEndpointConnection(resourceGroupName, privateAccessName, privateEndpointConnectionName, - context); - } - - public PagedIterable listPrivateEndpointConnections(String resourceGroupName, - String privateAccessName) { - PagedIterable inner - = this.serviceClient().listPrivateEndpointConnections(resourceGroupName, privateAccessName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())); - } - - public PagedIterable listPrivateEndpointConnections(String resourceGroupName, - String privateAccessName, Context context) { - PagedIterable inner - = this.serviceClient().listPrivateEndpointConnections(resourceGroupName, privateAccessName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())); - } - - public PrivateAccess getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String privateAccessName = ResourceManagerUtils.getValueFromIdByName(id, "privateAccesses"); - if (privateAccessName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateAccesses'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, privateAccessName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String privateAccessName = ResourceManagerUtils.getValueFromIdByName(id, "privateAccesses"); - if (privateAccessName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateAccesses'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, privateAccessName, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String privateAccessName = ResourceManagerUtils.getValueFromIdByName(id, "privateAccesses"); - if (privateAccessName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateAccesses'.", id))); - } - this.delete(resourceGroupName, privateAccessName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String privateAccessName = ResourceManagerUtils.getValueFromIdByName(id, "privateAccesses"); - if (privateAccessName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateAccesses'.", id))); - } - this.delete(resourceGroupName, privateAccessName, context); - } - - private PrivateAccessesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.chaos.ChaosManager manager() { - return this.serviceManager; - } - - public PrivateAccessImpl define(String name) { - return new PrivateAccessImpl(name, this.manager()); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/PrivateEndpointConnectionImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/PrivateEndpointConnectionImpl.java deleted file mode 100644 index fb51a628d783..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/PrivateEndpointConnectionImpl.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.implementation; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.chaos.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.chaos.models.PrivateEndpointConnection; -import com.azure.resourcemanager.chaos.models.PrivateEndpointConnectionProperties; - -public final class PrivateEndpointConnectionImpl implements PrivateEndpointConnection { - private PrivateEndpointConnectionInner innerObject; - - private final com.azure.resourcemanager.chaos.ChaosManager serviceManager; - - PrivateEndpointConnectionImpl(PrivateEndpointConnectionInner innerObject, - com.azure.resourcemanager.chaos.ChaosManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public PrivateEndpointConnectionProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public PrivateEndpointConnectionInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.chaos.ChaosManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/PrivateLinkResourceListResultImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/PrivateLinkResourceListResultImpl.java deleted file mode 100644 index f50e9988a057..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/PrivateLinkResourceListResultImpl.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.implementation; - -import com.azure.resourcemanager.chaos.fluent.models.PrivateLinkResourceListResultInner; -import com.azure.resourcemanager.chaos.models.PrivateLinkResource; -import com.azure.resourcemanager.chaos.models.PrivateLinkResourceListResult; -import java.util.Collections; -import java.util.List; - -public final class PrivateLinkResourceListResultImpl implements PrivateLinkResourceListResult { - private PrivateLinkResourceListResultInner innerObject; - - private final com.azure.resourcemanager.chaos.ChaosManager serviceManager; - - PrivateLinkResourceListResultImpl(PrivateLinkResourceListResultInner innerObject, - com.azure.resourcemanager.chaos.ChaosManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public List value() { - List inner = this.innerModel().value(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public String nextLink() { - return this.innerModel().nextLink(); - } - - public PrivateLinkResourceListResultInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.chaos.ChaosManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioConfigurationImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioConfigurationImpl.java deleted file mode 100644 index 0df3f144fab4..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioConfigurationImpl.java +++ /dev/null @@ -1,174 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.chaos.fluent.models.ScenarioConfigurationInner; -import com.azure.resourcemanager.chaos.models.FixResourcePermissionsRequest; -import com.azure.resourcemanager.chaos.models.PermissionsFix; -import com.azure.resourcemanager.chaos.models.ScenarioConfiguration; -import com.azure.resourcemanager.chaos.models.ScenarioConfigurationProperties; -import com.azure.resourcemanager.chaos.models.ScenarioConfigurationsExecuteResponse; -import com.azure.resourcemanager.chaos.models.Validation; - -public final class ScenarioConfigurationImpl - implements ScenarioConfiguration, ScenarioConfiguration.Definition, ScenarioConfiguration.Update { - private ScenarioConfigurationInner innerObject; - - private final com.azure.resourcemanager.chaos.ChaosManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public ScenarioConfigurationProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public ScenarioConfigurationInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.chaos.ChaosManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String scenarioName; - - private String scenarioConfigurationName; - - public ScenarioConfigurationImpl withExistingScenario(String resourceGroupName, String workspaceName, - String scenarioName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - this.scenarioName = scenarioName; - return this; - } - - public ScenarioConfiguration create() { - this.innerObject = serviceManager.serviceClient() - .getScenarioConfigurations() - .createOrUpdate(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, - this.innerModel(), Context.NONE); - return this; - } - - public ScenarioConfiguration create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getScenarioConfigurations() - .createOrUpdate(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, - this.innerModel(), context); - return this; - } - - ScenarioConfigurationImpl(String name, com.azure.resourcemanager.chaos.ChaosManager serviceManager) { - this.innerObject = new ScenarioConfigurationInner(); - this.serviceManager = serviceManager; - this.scenarioConfigurationName = name; - } - - public ScenarioConfigurationImpl update() { - return this; - } - - public ScenarioConfiguration apply() { - this.innerObject = serviceManager.serviceClient() - .getScenarioConfigurations() - .createOrUpdate(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, - this.innerModel(), Context.NONE); - return this; - } - - public ScenarioConfiguration apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getScenarioConfigurations() - .createOrUpdate(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, - this.innerModel(), context); - return this; - } - - ScenarioConfigurationImpl(ScenarioConfigurationInner innerObject, - com.azure.resourcemanager.chaos.ChaosManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.scenarioName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "scenarios"); - this.scenarioConfigurationName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "configurations"); - } - - public ScenarioConfiguration refresh() { - this.innerObject = serviceManager.serviceClient() - .getScenarioConfigurations() - .getWithResponse(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, Context.NONE) - .getValue(); - return this; - } - - public ScenarioConfiguration refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getScenarioConfigurations() - .getWithResponse(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, context) - .getValue(); - return this; - } - - public ScenarioConfigurationsExecuteResponse executeWithResponse(Context context) { - return serviceManager.scenarioConfigurations() - .executeWithResponse(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, context); - } - - public void execute() { - serviceManager.scenarioConfigurations() - .execute(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName); - } - - public Validation validate() { - return serviceManager.scenarioConfigurations() - .validate(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName); - } - - public Validation validate(Context context) { - return serviceManager.scenarioConfigurations() - .validate(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, context); - } - - public PermissionsFix fixResourcePermissions() { - return serviceManager.scenarioConfigurations() - .fixResourcePermissions(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName); - } - - public PermissionsFix fixResourcePermissions(FixResourcePermissionsRequest body, Context context) { - return serviceManager.scenarioConfigurations() - .fixResourcePermissions(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, body, - context); - } - - public ScenarioConfigurationImpl withProperties(ScenarioConfigurationProperties properties) { - this.innerModel().withProperties(properties); - return this; - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioConfigurationsClientImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioConfigurationsClientImpl.java deleted file mode 100644 index 5b89df9a5c12..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioConfigurationsClientImpl.java +++ /dev/null @@ -1,1410 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.BinaryData; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.chaos.fluent.ScenarioConfigurationsClient; -import com.azure.resourcemanager.chaos.fluent.models.ScenarioConfigurationInner; -import com.azure.resourcemanager.chaos.implementation.models.ScenarioConfigurationListResult; -import com.azure.resourcemanager.chaos.models.FixResourcePermissionsRequest; -import com.azure.resourcemanager.chaos.models.PermissionsFix; -import com.azure.resourcemanager.chaos.models.ScenarioConfigurationsExecuteResponse; -import com.azure.resourcemanager.chaos.models.Validation; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ScenarioConfigurationsClient. - */ -public final class ScenarioConfigurationsClientImpl implements ScenarioConfigurationsClient { - /** - * The proxy service used to perform REST calls. - */ - private final ScenarioConfigurationsService service; - - /** - * The service client containing this operation class. - */ - private final ChaosManagementClientImpl client; - - /** - * Initializes an instance of ScenarioConfigurationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ScenarioConfigurationsClientImpl(ChaosManagementClientImpl client) { - this.service = RestProxy.create(ScenarioConfigurationsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ChaosManagementClientScenarioConfigurations to be used by the proxy - * service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "ChaosManagementClientScenarioConfigurations") - public interface ScenarioConfigurationsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}/configurations/{scenarioConfigurationName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("scenarioName") String scenarioName, - @PathParam("scenarioConfigurationName") String scenarioConfigurationName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}/configurations/{scenarioConfigurationName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("scenarioName") String scenarioName, - @PathParam("scenarioConfigurationName") String scenarioConfigurationName, - @HeaderParam("Accept") String accept, Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}/configurations/{scenarioConfigurationName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("scenarioName") String scenarioName, - @PathParam("scenarioConfigurationName") String scenarioConfigurationName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ScenarioConfigurationInner resource, Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}/configurations/{scenarioConfigurationName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("scenarioName") String scenarioName, - @PathParam("scenarioConfigurationName") String scenarioConfigurationName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ScenarioConfigurationInner resource, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}/configurations/{scenarioConfigurationName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("scenarioName") String scenarioName, - @PathParam("scenarioConfigurationName") String scenarioConfigurationName, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}/configurations/{scenarioConfigurationName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("scenarioName") String scenarioName, - @PathParam("scenarioConfigurationName") String scenarioConfigurationName, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}/configurations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listAll(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("scenarioName") String scenarioName, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}/configurations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listAllSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("scenarioName") String scenarioName, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}/configurations/{scenarioConfigurationName}/execute") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono execute(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("scenarioName") String scenarioName, - @PathParam("scenarioConfigurationName") String scenarioConfigurationName, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}/configurations/{scenarioConfigurationName}/execute") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - ScenarioConfigurationsExecuteResponse executeSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("scenarioName") String scenarioName, - @PathParam("scenarioConfigurationName") String scenarioConfigurationName, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}/configurations/{scenarioConfigurationName}/validate") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> validate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("scenarioName") String scenarioName, - @PathParam("scenarioConfigurationName") String scenarioConfigurationName, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}/configurations/{scenarioConfigurationName}/validate") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response validateSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("scenarioName") String scenarioName, - @PathParam("scenarioConfigurationName") String scenarioConfigurationName, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}/configurations/{scenarioConfigurationName}/fixResourcePermissions") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> fixResourcePermissions(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("scenarioName") String scenarioName, - @PathParam("scenarioConfigurationName") String scenarioConfigurationName, - @BodyParam("application/json") FixResourcePermissionsRequest body, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}/configurations/{scenarioConfigurationName}/fixResourcePermissions") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response fixResourcePermissionsSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("scenarioName") String scenarioName, - @PathParam("scenarioConfigurationName") String scenarioConfigurationName, - @BodyParam("application/json") FixResourcePermissionsRequest body, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listAllNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listAllNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get a scenario definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @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 scenario definition along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String workspaceName, String scenarioName, String scenarioConfigurationName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, scenarioName, - scenarioConfigurationName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a scenario definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @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 scenario definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, - String scenarioName, String scenarioConfigurationName) { - return getWithResponseAsync(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a scenario definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @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 scenario definition along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, - String scenarioName, String scenarioConfigurationName, Context context) { - final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, accept, context); - } - - /** - * Get a scenario definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @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 scenario definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ScenarioConfigurationInner get(String resourceGroupName, String workspaceName, String scenarioName, - String scenarioConfigurationName) { - return getWithResponse(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, Context.NONE) - .getValue(); - } - - /** - * Create or update a scenario definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return model that represents the scenario along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String scenarioName, String scenarioConfigurationName, - ScenarioConfigurationInner resource) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, scenarioName, - scenarioConfigurationName, contentType, accept, resource, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update a scenario definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return model that represents the scenario along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, - String scenarioName, String scenarioConfigurationName, ScenarioConfigurationInner resource) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, - contentType, accept, resource, Context.NONE); - } - - /** - * Create or update a scenario definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return model that represents the scenario along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, - String scenarioName, String scenarioConfigurationName, ScenarioConfigurationInner resource, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, - contentType, accept, resource, context); - } - - /** - * Create or update a scenario definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of model that represents the scenario. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ScenarioConfigurationInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, String scenarioName, String scenarioConfigurationName, - ScenarioConfigurationInner resource) { - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, - scenarioName, scenarioConfigurationName, resource); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ScenarioConfigurationInner.class, ScenarioConfigurationInner.class, - this.client.getContext()); - } - - /** - * Create or update a scenario definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of model that represents the scenario. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ScenarioConfigurationInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String scenarioName, String scenarioConfigurationName, - ScenarioConfigurationInner resource) { - Response response = createOrUpdateWithResponse(resourceGroupName, workspaceName, scenarioName, - scenarioConfigurationName, resource); - return this.client.getLroResult(response, - ScenarioConfigurationInner.class, ScenarioConfigurationInner.class, Context.NONE); - } - - /** - * Create or update a scenario definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of model that represents the scenario. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ScenarioConfigurationInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String scenarioName, String scenarioConfigurationName, - ScenarioConfigurationInner resource, Context context) { - Response response = createOrUpdateWithResponse(resourceGroupName, workspaceName, scenarioName, - scenarioConfigurationName, resource, context); - return this.client.getLroResult(response, - ScenarioConfigurationInner.class, ScenarioConfigurationInner.class, context); - } - - /** - * Create or update a scenario definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return model that represents the scenario on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String scenarioName, String scenarioConfigurationName, ScenarioConfigurationInner resource) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, - resource).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update a scenario definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return model that represents the scenario. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ScenarioConfigurationInner createOrUpdate(String resourceGroupName, String workspaceName, - String scenarioName, String scenarioConfigurationName, ScenarioConfigurationInner resource) { - return beginCreateOrUpdate(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, resource) - .getFinalResult(); - } - - /** - * Create or update a scenario definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return model that represents the scenario. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ScenarioConfigurationInner createOrUpdate(String resourceGroupName, String workspaceName, - String scenarioName, String scenarioConfigurationName, ScenarioConfigurationInner resource, Context context) { - return beginCreateOrUpdate(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, resource, - context).getFinalResult(); - } - - /** - * Delete a scenario definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String scenarioName, String scenarioConfigurationName) { - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, scenarioName, - scenarioConfigurationName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a scenario definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String workspaceName, String scenarioName, - String scenarioConfigurationName) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, - Context.NONE); - } - - /** - * Delete a scenario definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String workspaceName, String scenarioName, - String scenarioConfigurationName, Context context) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, - context); - } - - /** - * Delete a scenario definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String scenarioName, String scenarioConfigurationName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete a scenario definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, - String scenarioName, String scenarioConfigurationName) { - Response response - = deleteWithResponse(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); - } - - /** - * Delete a scenario definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, - String scenarioName, String scenarioConfigurationName, Context context) { - Response response - = deleteWithResponse(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, context); - return this.client.getLroResult(response, Void.class, Void.class, context); - } - - /** - * Delete a scenario definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String scenarioName, - String scenarioConfigurationName) { - return beginDeleteAsync(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a scenario definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String scenarioName, - String scenarioConfigurationName) { - beginDelete(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName).getFinalResult(); - } - - /** - * Delete a scenario definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String scenarioName, - String scenarioConfigurationName, Context context) { - beginDelete(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, context) - .getFinalResult(); - } - - /** - * Get a list of scenario definitions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @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 scenario definitions along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listAllSinglePageAsync(String resourceGroupName, - String workspaceName, String scenarioName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listAll(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, scenarioName, 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 scenario definitions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @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 scenario definitions as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAllAsync(String resourceGroupName, String workspaceName, - String scenarioName) { - return new PagedFlux<>(() -> listAllSinglePageAsync(resourceGroupName, workspaceName, scenarioName), - nextLink -> listAllNextSinglePageAsync(nextLink)); - } - - /** - * Get a list of scenario definitions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @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 scenario definitions along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listAllSinglePage(String resourceGroupName, String workspaceName, - String scenarioName) { - final String accept = "application/json"; - Response res - = service.listAllSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, scenarioName, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get a list of scenario definitions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @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 scenario definitions along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listAllSinglePage(String resourceGroupName, String workspaceName, - String scenarioName, Context context) { - final String accept = "application/json"; - Response res - = service.listAllSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, scenarioName, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get a list of scenario definitions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @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 scenario definitions as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listAll(String resourceGroupName, String workspaceName, - String scenarioName) { - return new PagedIterable<>(() -> listAllSinglePage(resourceGroupName, workspaceName, scenarioName), - nextLink -> listAllNextSinglePage(nextLink)); - } - - /** - * Get a list of scenario definitions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @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 scenario definitions as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listAll(String resourceGroupName, String workspaceName, - String scenarioName, Context context) { - return new PagedIterable<>(() -> listAllSinglePage(resourceGroupName, workspaceName, scenarioName, context), - nextLink -> listAllNextSinglePage(nextLink, context)); - } - - /** - * Execute the scenario execution with the given scenario configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono executeWithResponseAsync(String resourceGroupName, - String workspaceName, String scenarioName, String scenarioConfigurationName) { - return FluxUtil - .withContext(context -> service.execute(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, scenarioName, - scenarioConfigurationName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Execute the scenario execution with the given scenario configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono executeAsync(String resourceGroupName, String workspaceName, String scenarioName, - String scenarioConfigurationName) { - return executeWithResponseAsync(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Execute the scenario execution with the given scenario configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ScenarioConfigurationsExecuteResponse executeWithResponse(String resourceGroupName, String workspaceName, - String scenarioName, String scenarioConfigurationName, Context context) { - return service.executeSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, - context); - } - - /** - * Execute the scenario execution with the given scenario configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void execute(String resourceGroupName, String workspaceName, String scenarioName, - String scenarioConfigurationName) { - executeWithResponse(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, Context.NONE); - } - - /** - * Validate the given scenario configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> validateWithResponseAsync(String resourceGroupName, String workspaceName, - String scenarioName, String scenarioConfigurationName) { - return FluxUtil - .withContext(context -> service.validate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, scenarioName, - scenarioConfigurationName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Validate the given scenario configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response validateWithResponse(String resourceGroupName, String workspaceName, - String scenarioName, String scenarioConfigurationName) { - return service.validateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, - Context.NONE); - } - - /** - * Validate the given scenario configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response validateWithResponse(String resourceGroupName, String workspaceName, - String scenarioName, String scenarioConfigurationName, Context context) { - return service.validateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, - context); - } - - /** - * Validate the given scenario configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Validation> beginValidateAsync(String resourceGroupName, - String workspaceName, String scenarioName, String scenarioConfigurationName) { - Mono>> mono - = validateWithResponseAsync(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Validation.class, - Validation.class, this.client.getContext()); - } - - /** - * Validate the given scenario configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Validation> beginValidate(String resourceGroupName, String workspaceName, - String scenarioName, String scenarioConfigurationName) { - Response response - = validateWithResponse(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName); - return this.client.getLroResult(response, Validation.class, Validation.class, - Context.NONE); - } - - /** - * Validate the given scenario configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Validation> beginValidate(String resourceGroupName, String workspaceName, - String scenarioName, String scenarioConfigurationName, Context context) { - Response response - = validateWithResponse(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, context); - return this.client.getLroResult(response, Validation.class, Validation.class, context); - } - - /** - * Validate the given scenario configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono validateAsync(String resourceGroupName, String workspaceName, String scenarioName, - String scenarioConfigurationName) { - return beginValidateAsync(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Validate the given scenario configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Validation validate(String resourceGroupName, String workspaceName, String scenarioName, - String scenarioConfigurationName) { - return beginValidate(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName) - .getFinalResult(); - } - - /** - * Validate the given scenario configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Validation validate(String resourceGroupName, String workspaceName, String scenarioName, - String scenarioConfigurationName, Context context) { - return beginValidate(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, context) - .getFinalResult(); - } - - /** - * Fixes resource permissions for the given scenario configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @param body The body 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 the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> fixResourcePermissionsWithResponseAsync(String resourceGroupName, - String workspaceName, String scenarioName, String scenarioConfigurationName, - FixResourcePermissionsRequest body) { - return FluxUtil - .withContext(context -> service.fixResourcePermissions(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, - scenarioName, scenarioConfigurationName, body, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Fixes resource permissions for the given scenario configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @param body The body 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 the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response fixResourcePermissionsWithResponse(String resourceGroupName, String workspaceName, - String scenarioName, String scenarioConfigurationName, FixResourcePermissionsRequest body) { - return service.fixResourcePermissionsSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, - body, Context.NONE); - } - - /** - * Fixes resource permissions for the given scenario configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @param body The body 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 the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response fixResourcePermissionsWithResponse(String resourceGroupName, String workspaceName, - String scenarioName, String scenarioConfigurationName, FixResourcePermissionsRequest body, Context context) { - return service.fixResourcePermissionsSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, - body, context); - } - - /** - * Fixes resource permissions for the given scenario configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @param body The body 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 the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, PermissionsFix> beginFixResourcePermissionsAsync( - String resourceGroupName, String workspaceName, String scenarioName, String scenarioConfigurationName, - FixResourcePermissionsRequest body) { - Mono>> mono = fixResourcePermissionsWithResponseAsync(resourceGroupName, - workspaceName, scenarioName, scenarioConfigurationName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - PermissionsFix.class, PermissionsFix.class, this.client.getContext()); - } - - /** - * Fixes resource permissions for the given scenario configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, PermissionsFix> beginFixResourcePermissionsAsync( - String resourceGroupName, String workspaceName, String scenarioName, String scenarioConfigurationName) { - final FixResourcePermissionsRequest body = null; - Mono>> mono = fixResourcePermissionsWithResponseAsync(resourceGroupName, - workspaceName, scenarioName, scenarioConfigurationName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - PermissionsFix.class, PermissionsFix.class, this.client.getContext()); - } - - /** - * Fixes resource permissions for the given scenario configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @param body The body 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 the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, PermissionsFix> beginFixResourcePermissions(String resourceGroupName, - String workspaceName, String scenarioName, String scenarioConfigurationName, - FixResourcePermissionsRequest body) { - Response response = fixResourcePermissionsWithResponse(resourceGroupName, workspaceName, - scenarioName, scenarioConfigurationName, body); - return this.client.getLroResult(response, PermissionsFix.class, - PermissionsFix.class, Context.NONE); - } - - /** - * Fixes resource permissions for the given scenario configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, PermissionsFix> beginFixResourcePermissions(String resourceGroupName, - String workspaceName, String scenarioName, String scenarioConfigurationName) { - final FixResourcePermissionsRequest body = null; - Response response = fixResourcePermissionsWithResponse(resourceGroupName, workspaceName, - scenarioName, scenarioConfigurationName, body); - return this.client.getLroResult(response, PermissionsFix.class, - PermissionsFix.class, Context.NONE); - } - - /** - * Fixes resource permissions for the given scenario configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @param body The body 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 the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, PermissionsFix> beginFixResourcePermissions(String resourceGroupName, - String workspaceName, String scenarioName, String scenarioConfigurationName, FixResourcePermissionsRequest body, - Context context) { - Response response = fixResourcePermissionsWithResponse(resourceGroupName, workspaceName, - scenarioName, scenarioConfigurationName, body, context); - return this.client.getLroResult(response, PermissionsFix.class, - PermissionsFix.class, context); - } - - /** - * Fixes resource permissions for the given scenario configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @param body The body 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 the response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono fixResourcePermissionsAsync(String resourceGroupName, String workspaceName, - String scenarioName, String scenarioConfigurationName, FixResourcePermissionsRequest body) { - return beginFixResourcePermissionsAsync(resourceGroupName, workspaceName, scenarioName, - scenarioConfigurationName, body).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Fixes resource permissions for the given scenario configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono fixResourcePermissionsAsync(String resourceGroupName, String workspaceName, - String scenarioName, String scenarioConfigurationName) { - final FixResourcePermissionsRequest body = null; - return beginFixResourcePermissionsAsync(resourceGroupName, workspaceName, scenarioName, - scenarioConfigurationName, body).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Fixes resource permissions for the given scenario configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PermissionsFix fixResourcePermissions(String resourceGroupName, String workspaceName, String scenarioName, - String scenarioConfigurationName) { - final FixResourcePermissionsRequest body = null; - return beginFixResourcePermissions(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, - body).getFinalResult(); - } - - /** - * Fixes resource permissions for the given scenario configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @param body The body 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 the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PermissionsFix fixResourcePermissions(String resourceGroupName, String workspaceName, String scenarioName, - String scenarioConfigurationName, FixResourcePermissionsRequest body, Context context) { - return beginFixResourcePermissions(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, - body, context).getFinalResult(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of scenario definitions along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listAllNextSinglePageAsync(String nextLink) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listAllNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of scenario definitions along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listAllNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listAllNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return 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. - * @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 scenario definitions along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listAllNextSinglePage(String nextLink, Context context) { - final String accept = "application/json"; - Response res - = service.listAllNextSync(nextLink, this.client.getEndpoint(), accept, context); - return 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/ScenarioConfigurationsImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioConfigurationsImpl.java deleted file mode 100644 index f8849950fd0f..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioConfigurationsImpl.java +++ /dev/null @@ -1,221 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.chaos.fluent.ScenarioConfigurationsClient; -import com.azure.resourcemanager.chaos.fluent.models.ScenarioConfigurationInner; -import com.azure.resourcemanager.chaos.models.FixResourcePermissionsRequest; -import com.azure.resourcemanager.chaos.models.PermissionsFix; -import com.azure.resourcemanager.chaos.models.ScenarioConfiguration; -import com.azure.resourcemanager.chaos.models.ScenarioConfigurations; -import com.azure.resourcemanager.chaos.models.ScenarioConfigurationsExecuteResponse; -import com.azure.resourcemanager.chaos.models.Validation; - -public final class ScenarioConfigurationsImpl implements ScenarioConfigurations { - private static final ClientLogger LOGGER = new ClientLogger(ScenarioConfigurationsImpl.class); - - private final ScenarioConfigurationsClient innerClient; - - private final com.azure.resourcemanager.chaos.ChaosManager serviceManager; - - public ScenarioConfigurationsImpl(ScenarioConfigurationsClient innerClient, - com.azure.resourcemanager.chaos.ChaosManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getWithResponse(String resourceGroupName, String workspaceName, - String scenarioName, String scenarioConfigurationName, Context context) { - Response inner = this.serviceClient() - .getWithResponse(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, context); - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ScenarioConfigurationImpl(inner.getValue(), this.manager())); - } - - public ScenarioConfiguration get(String resourceGroupName, String workspaceName, String scenarioName, - String scenarioConfigurationName) { - ScenarioConfigurationInner inner - = this.serviceClient().get(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName); - if (inner != null) { - return new ScenarioConfigurationImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String workspaceName, String scenarioName, - String scenarioConfigurationName) { - this.serviceClient().delete(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName); - } - - public void delete(String resourceGroupName, String workspaceName, String scenarioName, - String scenarioConfigurationName, Context context) { - this.serviceClient().delete(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, context); - } - - public PagedIterable listAll(String resourceGroupName, String workspaceName, - String scenarioName) { - PagedIterable inner - = this.serviceClient().listAll(resourceGroupName, workspaceName, scenarioName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ScenarioConfigurationImpl(inner1, this.manager())); - } - - public PagedIterable listAll(String resourceGroupName, String workspaceName, - String scenarioName, Context context) { - PagedIterable inner - = this.serviceClient().listAll(resourceGroupName, workspaceName, scenarioName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ScenarioConfigurationImpl(inner1, this.manager())); - } - - public ScenarioConfigurationsExecuteResponse executeWithResponse(String resourceGroupName, String workspaceName, - String scenarioName, String scenarioConfigurationName, Context context) { - return this.serviceClient() - .executeWithResponse(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, context); - } - - public void execute(String resourceGroupName, String workspaceName, String scenarioName, - String scenarioConfigurationName) { - this.serviceClient().execute(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName); - } - - public Validation validate(String resourceGroupName, String workspaceName, String scenarioName, - String scenarioConfigurationName) { - return this.serviceClient().validate(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName); - } - - public Validation validate(String resourceGroupName, String workspaceName, String scenarioName, - String scenarioConfigurationName, Context context) { - return this.serviceClient() - .validate(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, context); - } - - public PermissionsFix fixResourcePermissions(String resourceGroupName, String workspaceName, String scenarioName, - String scenarioConfigurationName) { - return this.serviceClient() - .fixResourcePermissions(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName); - } - - public PermissionsFix fixResourcePermissions(String resourceGroupName, String workspaceName, String scenarioName, - String scenarioConfigurationName, FixResourcePermissionsRequest body, Context context) { - return this.serviceClient() - .fixResourcePermissions(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, body, - context); - } - - public ScenarioConfiguration getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String scenarioName = ResourceManagerUtils.getValueFromIdByName(id, "scenarios"); - if (scenarioName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'scenarios'.", id))); - } - String scenarioConfigurationName = ResourceManagerUtils.getValueFromIdByName(id, "configurations"); - if (scenarioConfigurationName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'configurations'.", id))); - } - return this - .getWithResponse(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, Context.NONE) - .getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String scenarioName = ResourceManagerUtils.getValueFromIdByName(id, "scenarios"); - if (scenarioName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'scenarios'.", id))); - } - String scenarioConfigurationName = ResourceManagerUtils.getValueFromIdByName(id, "configurations"); - if (scenarioConfigurationName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'configurations'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String scenarioName = ResourceManagerUtils.getValueFromIdByName(id, "scenarios"); - if (scenarioName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'scenarios'.", id))); - } - String scenarioConfigurationName = ResourceManagerUtils.getValueFromIdByName(id, "configurations"); - if (scenarioConfigurationName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'configurations'.", id))); - } - this.delete(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String scenarioName = ResourceManagerUtils.getValueFromIdByName(id, "scenarios"); - if (scenarioName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'scenarios'.", id))); - } - String scenarioConfigurationName = ResourceManagerUtils.getValueFromIdByName(id, "configurations"); - if (scenarioConfigurationName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'configurations'.", id))); - } - this.delete(resourceGroupName, workspaceName, scenarioName, scenarioConfigurationName, context); - } - - private ScenarioConfigurationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.chaos.ChaosManager manager() { - return this.serviceManager; - } - - public ScenarioConfigurationImpl define(String name) { - return new ScenarioConfigurationImpl(name, this.manager()); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioImpl.java deleted file mode 100644 index e9ccf1ac7a99..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioImpl.java +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.chaos.fluent.models.ScenarioInner; -import com.azure.resourcemanager.chaos.models.Scenario; -import com.azure.resourcemanager.chaos.models.ScenarioProperties; - -public final class ScenarioImpl implements Scenario, Scenario.Definition, Scenario.Update { - private ScenarioInner innerObject; - - private final com.azure.resourcemanager.chaos.ChaosManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public ScenarioProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public ScenarioInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.chaos.ChaosManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String scenarioName; - - public ScenarioImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public Scenario create() { - this.innerObject = serviceManager.serviceClient() - .getScenarios() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, scenarioName, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public Scenario create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getScenarios() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, scenarioName, this.innerModel(), context) - .getValue(); - return this; - } - - ScenarioImpl(String name, com.azure.resourcemanager.chaos.ChaosManager serviceManager) { - this.innerObject = new ScenarioInner(); - this.serviceManager = serviceManager; - this.scenarioName = name; - } - - public ScenarioImpl update() { - return this; - } - - public Scenario apply() { - this.innerObject = serviceManager.serviceClient() - .getScenarios() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, scenarioName, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public Scenario apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getScenarios() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, scenarioName, this.innerModel(), context) - .getValue(); - return this; - } - - ScenarioImpl(ScenarioInner innerObject, com.azure.resourcemanager.chaos.ChaosManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.scenarioName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "scenarios"); - } - - public Scenario refresh() { - this.innerObject = serviceManager.serviceClient() - .getScenarios() - .getWithResponse(resourceGroupName, workspaceName, scenarioName, Context.NONE) - .getValue(); - return this; - } - - public Scenario refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getScenarios() - .getWithResponse(resourceGroupName, workspaceName, scenarioName, context) - .getValue(); - return this; - } - - public ScenarioImpl withProperties(ScenarioProperties properties) { - this.innerModel().withProperties(properties); - return this; - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioRunImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioRunImpl.java deleted file mode 100644 index 7d25b39c91a4..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioRunImpl.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.implementation; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.chaos.fluent.models.ScenarioRunInner; -import com.azure.resourcemanager.chaos.models.ScenarioRun; -import com.azure.resourcemanager.chaos.models.ScenarioRunProperties; - -public final class ScenarioRunImpl implements ScenarioRun { - private ScenarioRunInner innerObject; - - private final com.azure.resourcemanager.chaos.ChaosManager serviceManager; - - ScenarioRunImpl(ScenarioRunInner innerObject, com.azure.resourcemanager.chaos.ChaosManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public ScenarioRunProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public ScenarioRunInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.chaos.ChaosManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioRunsClientImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioRunsClientImpl.java deleted file mode 100644 index ed305f9bc5cf..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioRunsClientImpl.java +++ /dev/null @@ -1,471 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.chaos.fluent.ScenarioRunsClient; -import com.azure.resourcemanager.chaos.fluent.models.ScenarioRunInner; -import com.azure.resourcemanager.chaos.implementation.models.ScenarioRunListResult; -import com.azure.resourcemanager.chaos.models.ScenarioRunsCancelResponse; -import com.azure.resourcemanager.chaos.models.ScenarioRunsGetResponse; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ScenarioRunsClient. - */ -public final class ScenarioRunsClientImpl implements ScenarioRunsClient { - /** - * The proxy service used to perform REST calls. - */ - private final ScenarioRunsService service; - - /** - * The service client containing this operation class. - */ - private final ChaosManagementClientImpl client; - - /** - * Initializes an instance of ScenarioRunsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ScenarioRunsClientImpl(ChaosManagementClientImpl client) { - this.service - = RestProxy.create(ScenarioRunsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ChaosManagementClientScenarioRuns to be used by the proxy service to - * perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "ChaosManagementClientScenarioRuns") - public interface ScenarioRunsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}/runs/{runId}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("scenarioName") String scenarioName, @PathParam("runId") String runId, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}/runs/{runId}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - ScenarioRunsGetResponse getSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("scenarioName") String scenarioName, @PathParam("runId") String runId, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}/runs") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listAll(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("scenarioName") String scenarioName, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}/runs") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listAllSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("scenarioName") String scenarioName, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}/runs/{runId}/cancel") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono cancel(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("scenarioName") String scenarioName, @PathParam("runId") String runId, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}/runs/{runId}/cancel") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - ScenarioRunsCancelResponse cancelSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("scenarioName") String scenarioName, @PathParam("runId") String runId, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listAllNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listAllNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get a scenario run. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param runId The name of the ScenarioRun. - * @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 scenario run on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getWithResponseAsync(String resourceGroupName, String workspaceName, - String scenarioName, String runId) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, scenarioName, runId, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a scenario run. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param runId The name of the ScenarioRun. - * @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 scenario run on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String scenarioName, - String runId) { - return getWithResponseAsync(resourceGroupName, workspaceName, scenarioName, runId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a scenario run. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param runId The name of the ScenarioRun. - * @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 scenario run. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ScenarioRunsGetResponse getWithResponse(String resourceGroupName, String workspaceName, String scenarioName, - String runId, Context context) { - final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, scenarioName, runId, accept, context); - } - - /** - * Get a scenario run. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param runId The name of the ScenarioRun. - * @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 scenario run. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ScenarioRunInner get(String resourceGroupName, String workspaceName, String scenarioName, String runId) { - return getWithResponse(resourceGroupName, workspaceName, scenarioName, runId, Context.NONE).getValue(); - } - - /** - * Get a list of scenario runs. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @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 scenario runs along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listAllSinglePageAsync(String resourceGroupName, String workspaceName, - String scenarioName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listAll(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, scenarioName, 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 scenario runs. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @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 scenario runs as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAllAsync(String resourceGroupName, String workspaceName, - String scenarioName) { - return new PagedFlux<>(() -> listAllSinglePageAsync(resourceGroupName, workspaceName, scenarioName), - nextLink -> listAllNextSinglePageAsync(nextLink)); - } - - /** - * Get a list of scenario runs. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @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 scenario runs along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listAllSinglePage(String resourceGroupName, String workspaceName, - String scenarioName) { - final String accept = "application/json"; - Response res - = service.listAllSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, scenarioName, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get a list of scenario runs. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @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 scenario runs along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listAllSinglePage(String resourceGroupName, String workspaceName, - String scenarioName, Context context) { - final String accept = "application/json"; - Response res - = service.listAllSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, scenarioName, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get a list of scenario runs. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @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 scenario runs as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listAll(String resourceGroupName, String workspaceName, - String scenarioName) { - return new PagedIterable<>(() -> listAllSinglePage(resourceGroupName, workspaceName, scenarioName), - nextLink -> listAllNextSinglePage(nextLink)); - } - - /** - * Get a list of scenario runs. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @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 scenario runs as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listAll(String resourceGroupName, String workspaceName, String scenarioName, - Context context) { - return new PagedIterable<>(() -> listAllSinglePage(resourceGroupName, workspaceName, scenarioName, context), - nextLink -> listAllNextSinglePage(nextLink, context)); - } - - /** - * Cancel the currently running scenario execution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param runId The name of the ScenarioRun. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono cancelWithResponseAsync(String resourceGroupName, String workspaceName, - String scenarioName, String runId) { - return FluxUtil - .withContext(context -> service.cancel(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, scenarioName, runId, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Cancel the currently running scenario execution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param runId The name of the ScenarioRun. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono cancelAsync(String resourceGroupName, String workspaceName, String scenarioName, String runId) { - return cancelWithResponseAsync(resourceGroupName, workspaceName, scenarioName, runId) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Cancel the currently running scenario execution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param runId The name of the ScenarioRun. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ScenarioRunsCancelResponse cancelWithResponse(String resourceGroupName, String workspaceName, - String scenarioName, String runId, Context context) { - return service.cancelSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, scenarioName, runId, context); - } - - /** - * Cancel the currently running scenario execution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param runId The name of the ScenarioRun. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void cancel(String resourceGroupName, String workspaceName, String scenarioName, String runId) { - cancelWithResponse(resourceGroupName, workspaceName, scenarioName, runId, Context.NONE); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of scenario runs along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listAllNextSinglePageAsync(String nextLink) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listAllNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of scenario runs along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listAllNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listAllNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return 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. - * @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 scenario runs along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listAllNextSinglePage(String nextLink, Context context) { - final String accept = "application/json"; - Response res - = service.listAllNextSync(nextLink, this.client.getEndpoint(), accept, context); - return 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/ScenarioRunsImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioRunsImpl.java deleted file mode 100644 index 100fad2e7ad3..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioRunsImpl.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.chaos.fluent.ScenarioRunsClient; -import com.azure.resourcemanager.chaos.fluent.models.ScenarioRunInner; -import com.azure.resourcemanager.chaos.models.ScenarioRun; -import com.azure.resourcemanager.chaos.models.ScenarioRuns; -import com.azure.resourcemanager.chaos.models.ScenarioRunsCancelResponse; -import com.azure.resourcemanager.chaos.models.ScenarioRunsGetResponse; - -public final class ScenarioRunsImpl implements ScenarioRuns { - private static final ClientLogger LOGGER = new ClientLogger(ScenarioRunsImpl.class); - - private final ScenarioRunsClient innerClient; - - private final com.azure.resourcemanager.chaos.ChaosManager serviceManager; - - public ScenarioRunsImpl(ScenarioRunsClient innerClient, - com.azure.resourcemanager.chaos.ChaosManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getWithResponse(String resourceGroupName, String workspaceName, String scenarioName, - String runId, Context context) { - ScenarioRunsGetResponse inner - = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, scenarioName, runId, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ScenarioRunImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ScenarioRun get(String resourceGroupName, String workspaceName, String scenarioName, String runId) { - ScenarioRunInner inner = this.serviceClient().get(resourceGroupName, workspaceName, scenarioName, runId); - if (inner != null) { - return new ScenarioRunImpl(inner, this.manager()); - } else { - return null; - } - } - - public PagedIterable listAll(String resourceGroupName, String workspaceName, String scenarioName) { - PagedIterable inner - = this.serviceClient().listAll(resourceGroupName, workspaceName, scenarioName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ScenarioRunImpl(inner1, this.manager())); - } - - public PagedIterable listAll(String resourceGroupName, String workspaceName, String scenarioName, - Context context) { - PagedIterable inner - = this.serviceClient().listAll(resourceGroupName, workspaceName, scenarioName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ScenarioRunImpl(inner1, this.manager())); - } - - public ScenarioRunsCancelResponse cancelWithResponse(String resourceGroupName, String workspaceName, - String scenarioName, String runId, Context context) { - return this.serviceClient().cancelWithResponse(resourceGroupName, workspaceName, scenarioName, runId, context); - } - - public void cancel(String resourceGroupName, String workspaceName, String scenarioName, String runId) { - this.serviceClient().cancel(resourceGroupName, workspaceName, scenarioName, runId); - } - - private ScenarioRunsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.chaos.ChaosManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenariosClientImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenariosClientImpl.java deleted file mode 100644 index c10b56539513..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenariosClientImpl.java +++ /dev/null @@ -1,551 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.chaos.fluent.ScenariosClient; -import com.azure.resourcemanager.chaos.fluent.models.ScenarioInner; -import com.azure.resourcemanager.chaos.implementation.models.ScenarioListResult; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ScenariosClient. - */ -public final class ScenariosClientImpl implements ScenariosClient { - /** - * The proxy service used to perform REST calls. - */ - private final ScenariosService service; - - /** - * The service client containing this operation class. - */ - private final ChaosManagementClientImpl client; - - /** - * Initializes an instance of ScenariosClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ScenariosClientImpl(ChaosManagementClientImpl client) { - this.service - = RestProxy.create(ScenariosService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ChaosManagementClientScenarios to be used by the proxy service to - * perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "ChaosManagementClientScenarios") - public interface ScenariosService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("scenarioName") String scenarioName, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("scenarioName") String scenarioName, @HeaderParam("Accept") String accept, Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("scenarioName") String scenarioName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") ScenarioInner resource, - Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("scenarioName") String scenarioName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") ScenarioInner resource, - Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("scenarioName") String scenarioName, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("scenarioName") String scenarioName, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listAll(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listAllSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listAllNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listAllNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get a scenario. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @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 scenario along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String scenarioName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, scenarioName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a scenario. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @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 scenario on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String scenarioName) { - return getWithResponseAsync(resourceGroupName, workspaceName, scenarioName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a scenario. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @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 scenario along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, String scenarioName, - Context context) { - final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, scenarioName, accept, context); - } - - /** - * Get a scenario. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @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 scenario. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ScenarioInner get(String resourceGroupName, String workspaceName, String scenarioName) { - return getWithResponse(resourceGroupName, workspaceName, scenarioName, Context.NONE).getValue(); - } - - /** - * Create or update a scenario. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return model that represents the scenario along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String scenarioName, ScenarioInner resource) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, scenarioName, contentType, accept, - resource, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update a scenario. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return model that represents the scenario on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, String scenarioName, - ScenarioInner resource) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, scenarioName, resource) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Create or update a scenario. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return model that represents the scenario along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, - String scenarioName, ScenarioInner resource, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, scenarioName, contentType, accept, - resource, context); - } - - /** - * Create or update a scenario. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return model that represents the scenario. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ScenarioInner createOrUpdate(String resourceGroupName, String workspaceName, String scenarioName, - ScenarioInner resource) { - return createOrUpdateWithResponse(resourceGroupName, workspaceName, scenarioName, resource, Context.NONE) - .getValue(); - } - - /** - * Delete a scenario. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String scenarioName) { - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, scenarioName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a scenario. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String scenarioName) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, scenarioName).flatMap(ignored -> Mono.empty()); - } - - /** - * Delete a scenario. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String workspaceName, String scenarioName, - Context context) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, scenarioName, context); - } - - /** - * Delete a scenario. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String scenarioName) { - deleteWithResponse(resourceGroupName, workspaceName, scenarioName, Context.NONE); - } - - /** - * Get a list of scenarios. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace 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 scenarios along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listAllSinglePageAsync(String resourceGroupName, String workspaceName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listAll(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, 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 scenarios. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace 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 scenarios as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAllAsync(String resourceGroupName, String workspaceName) { - return new PagedFlux<>(() -> listAllSinglePageAsync(resourceGroupName, workspaceName), - nextLink -> listAllNextSinglePageAsync(nextLink)); - } - - /** - * Get a list of scenarios. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace 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 scenarios along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listAllSinglePage(String resourceGroupName, String workspaceName) { - final String accept = "application/json"; - Response res = service.listAllSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get a list of scenarios. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of scenarios along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listAllSinglePage(String resourceGroupName, String workspaceName, - Context context) { - final String accept = "application/json"; - Response res = service.listAllSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get a list of scenarios. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace 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 scenarios as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listAll(String resourceGroupName, String workspaceName) { - return new PagedIterable<>(() -> listAllSinglePage(resourceGroupName, workspaceName), - nextLink -> listAllNextSinglePage(nextLink)); - } - - /** - * Get a list of scenarios. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of scenarios as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listAll(String resourceGroupName, String workspaceName, Context context) { - return new PagedIterable<>(() -> listAllSinglePage(resourceGroupName, workspaceName, context), - nextLink -> listAllNextSinglePage(nextLink, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of scenarios along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listAllNextSinglePageAsync(String nextLink) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listAllNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of scenarios along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listAllNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listAllNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return 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. - * @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 scenarios along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listAllNextSinglePage(String nextLink, Context context) { - final String accept = "application/json"; - Response res - = service.listAllNextSync(nextLink, this.client.getEndpoint(), accept, context); - return 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/ScenariosImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenariosImpl.java deleted file mode 100644 index 161e32e4ac7c..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/ScenariosImpl.java +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.chaos.fluent.ScenariosClient; -import com.azure.resourcemanager.chaos.fluent.models.ScenarioInner; -import com.azure.resourcemanager.chaos.models.Scenario; -import com.azure.resourcemanager.chaos.models.Scenarios; - -public final class ScenariosImpl implements Scenarios { - private static final ClientLogger LOGGER = new ClientLogger(ScenariosImpl.class); - - private final ScenariosClient innerClient; - - private final com.azure.resourcemanager.chaos.ChaosManager serviceManager; - - public ScenariosImpl(ScenariosClient innerClient, com.azure.resourcemanager.chaos.ChaosManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getWithResponse(String resourceGroupName, String workspaceName, String scenarioName, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, scenarioName, context); - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ScenarioImpl(inner.getValue(), this.manager())); - } - - public Scenario get(String resourceGroupName, String workspaceName, String scenarioName) { - ScenarioInner inner = this.serviceClient().get(resourceGroupName, workspaceName, scenarioName); - if (inner != null) { - return new ScenarioImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response deleteWithResponse(String resourceGroupName, String workspaceName, String scenarioName, - Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, scenarioName, context); - } - - public void delete(String resourceGroupName, String workspaceName, String scenarioName) { - this.serviceClient().delete(resourceGroupName, workspaceName, scenarioName); - } - - public PagedIterable listAll(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().listAll(resourceGroupName, workspaceName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ScenarioImpl(inner1, this.manager())); - } - - public PagedIterable listAll(String resourceGroupName, String workspaceName, Context context) { - PagedIterable inner = this.serviceClient().listAll(resourceGroupName, workspaceName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ScenarioImpl(inner1, this.manager())); - } - - public Scenario getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String scenarioName = ResourceManagerUtils.getValueFromIdByName(id, "scenarios"); - if (scenarioName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'scenarios'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, scenarioName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String scenarioName = ResourceManagerUtils.getValueFromIdByName(id, "scenarios"); - if (scenarioName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'scenarios'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, scenarioName, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String scenarioName = ResourceManagerUtils.getValueFromIdByName(id, "scenarios"); - if (scenarioName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'scenarios'.", id))); - } - this.deleteWithResponse(resourceGroupName, workspaceName, scenarioName, Context.NONE); - } - - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String scenarioName = ResourceManagerUtils.getValueFromIdByName(id, "scenarios"); - if (scenarioName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'scenarios'.", id))); - } - return this.deleteWithResponse(resourceGroupName, workspaceName, scenarioName, context); - } - - private ScenariosClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.chaos.ChaosManager manager() { - return this.serviceManager; - } - - public ScenarioImpl define(String name) { - return new ScenarioImpl(name, this.manager()); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/WorkspaceImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/WorkspaceImpl.java deleted file mode 100644 index 16098597e56e..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/WorkspaceImpl.java +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.implementation; - -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.chaos.fluent.models.WorkspaceInner; -import com.azure.resourcemanager.chaos.models.ResourceIdentity; -import com.azure.resourcemanager.chaos.models.Workspace; -import com.azure.resourcemanager.chaos.models.WorkspaceEvaluation; -import com.azure.resourcemanager.chaos.models.WorkspaceProperties; -import com.azure.resourcemanager.chaos.models.WorkspaceUpdate; -import java.util.Collections; -import java.util.Map; - -public final class WorkspaceImpl implements Workspace, Workspace.Definition, Workspace.Update { - private WorkspaceInner innerObject; - - private final com.azure.resourcemanager.chaos.ChaosManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String location() { - return this.innerModel().location(); - } - - public Map tags() { - Map inner = this.innerModel().tags(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public ResourceIdentity identity() { - return this.innerModel().identity(); - } - - public WorkspaceProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public WorkspaceInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.chaos.ChaosManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private WorkspaceUpdate updateProperties; - - public WorkspaceImpl withExistingResourceGroup(String resourceGroupName) { - this.resourceGroupName = resourceGroupName; - return this; - } - - public Workspace create() { - this.innerObject = serviceManager.serviceClient() - .getWorkspaces() - .createOrUpdate(resourceGroupName, workspaceName, this.innerModel(), Context.NONE); - return this; - } - - public Workspace create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getWorkspaces() - .createOrUpdate(resourceGroupName, workspaceName, this.innerModel(), context); - return this; - } - - WorkspaceImpl(String name, com.azure.resourcemanager.chaos.ChaosManager serviceManager) { - this.innerObject = new WorkspaceInner(); - this.serviceManager = serviceManager; - this.workspaceName = name; - } - - public WorkspaceImpl update() { - this.updateProperties = new WorkspaceUpdate(); - return this; - } - - public Workspace apply() { - this.innerObject = serviceManager.serviceClient() - .getWorkspaces() - .update(resourceGroupName, workspaceName, updateProperties, Context.NONE); - return this; - } - - public Workspace apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getWorkspaces() - .update(resourceGroupName, workspaceName, updateProperties, context); - return this; - } - - WorkspaceImpl(WorkspaceInner innerObject, com.azure.resourcemanager.chaos.ChaosManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); - } - - public Workspace refresh() { - this.innerObject = serviceManager.serviceClient() - .getWorkspaces() - .getByResourceGroupWithResponse(resourceGroupName, workspaceName, Context.NONE) - .getValue(); - return this; - } - - public Workspace refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getWorkspaces() - .getByResourceGroupWithResponse(resourceGroupName, workspaceName, context) - .getValue(); - return this; - } - - public WorkspaceEvaluation refreshRecommendations() { - return serviceManager.workspaces().refreshRecommendations(resourceGroupName, workspaceName); - } - - public WorkspaceEvaluation refreshRecommendations(Context context) { - return serviceManager.workspaces().refreshRecommendations(resourceGroupName, workspaceName, context); - } - - public WorkspaceImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public WorkspaceImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public WorkspaceImpl withProperties(WorkspaceProperties properties) { - this.innerModel().withProperties(properties); - return this; - } - - public WorkspaceImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateProperties.withTags(tags); - return this; - } - } - - public WorkspaceImpl withIdentity(ResourceIdentity identity) { - if (isInCreateMode()) { - this.innerModel().withIdentity(identity); - return this; - } else { - this.updateProperties.withIdentity(identity); - return this; - } - } - - private boolean isInCreateMode() { - return this.innerModel() == null || this.innerModel().id() == null; - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/WorkspacesClientImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/WorkspacesClientImpl.java deleted file mode 100644 index 55da7b4777e4..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/WorkspacesClientImpl.java +++ /dev/null @@ -1,1322 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.BinaryData; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.chaos.fluent.WorkspacesClient; -import com.azure.resourcemanager.chaos.fluent.models.WorkspaceInner; -import com.azure.resourcemanager.chaos.implementation.models.WorkspaceListResult; -import com.azure.resourcemanager.chaos.models.WorkspaceEvaluation; -import com.azure.resourcemanager.chaos.models.WorkspaceUpdate; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in WorkspacesClient. - */ -public final class WorkspacesClientImpl implements WorkspacesClient { - /** - * The proxy service used to perform REST calls. - */ - private final WorkspacesService service; - - /** - * The service client containing this operation class. - */ - private final ChaosManagementClientImpl client; - - /** - * Initializes an instance of WorkspacesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - WorkspacesClientImpl(ChaosManagementClientImpl client) { - this.service - = RestProxy.create(WorkspacesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ChaosManagementClientWorkspaces to be used by the proxy service to - * perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "ChaosManagementClientWorkspaces") - public interface WorkspacesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") WorkspaceInner resource, Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") WorkspaceInner resource, Context context); - - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") WorkspaceUpdate properties, Context context); - - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") WorkspaceUpdate properties, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("continuationToken") String continuationToken, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("continuationToken") String continuationToken, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/workspaces") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("continuationToken") String continuationToken, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/workspaces") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("continuationToken") String continuationToken, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/refreshRecommendations") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> refreshRecommendations(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/refreshRecommendations") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response refreshRecommendationsSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listAllNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listAllNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get a Workspace resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace 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 Workspace resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String workspaceName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a Workspace resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace 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 Workspace resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String workspaceName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, workspaceName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a Workspace resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace 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 Workspace resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, String workspaceName, - Context context) { - final String accept = "application/json"; - return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context); - } - - /** - * Get a Workspace resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace 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 Workspace resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceInner getByResourceGroup(String resourceGroupName, String workspaceName) { - return getByResourceGroupWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); - } - - /** - * Create or update a Workspace resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param resource Workspace resource to be created or updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return model that represents a Workspace resource along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, WorkspaceInner resource) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, contentType, accept, resource, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update a Workspace resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param resource Workspace resource to be created or updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return model that represents a Workspace resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, - WorkspaceInner resource) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, contentType, accept, resource, - Context.NONE); - } - - /** - * Create or update a Workspace resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param resource Workspace resource to be created or updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return model that represents a Workspace resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, - WorkspaceInner resource, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, contentType, accept, resource, context); - } - - /** - * Create or update a Workspace resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param resource Workspace resource to be created or updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of model that represents a Workspace resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkspaceInner> beginCreateOrUpdateAsync(String resourceGroupName, - String workspaceName, WorkspaceInner resource) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, resource); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - WorkspaceInner.class, WorkspaceInner.class, this.client.getContext()); - } - - /** - * Create or update a Workspace resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param resource Workspace resource to be created or updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of model that represents a Workspace resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkspaceInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, WorkspaceInner resource) { - Response response = createOrUpdateWithResponse(resourceGroupName, workspaceName, resource); - return this.client.getLroResult(response, WorkspaceInner.class, - WorkspaceInner.class, Context.NONE); - } - - /** - * Create or update a Workspace resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param resource Workspace resource to be created or updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of model that represents a Workspace resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkspaceInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, WorkspaceInner resource, Context context) { - Response response = createOrUpdateWithResponse(resourceGroupName, workspaceName, resource, context); - return this.client.getLroResult(response, WorkspaceInner.class, - WorkspaceInner.class, context); - } - - /** - * Create or update a Workspace resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param resource Workspace resource to be created or updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return model that represents a Workspace resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - WorkspaceInner resource) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, resource).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update a Workspace resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param resource Workspace resource to be created or updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return model that represents a Workspace resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceName, WorkspaceInner resource) { - return beginCreateOrUpdate(resourceGroupName, workspaceName, resource).getFinalResult(); - } - - /** - * Create or update a Workspace resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param resource Workspace resource to be created or updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return model that represents a Workspace resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceName, WorkspaceInner resource, - Context context) { - return beginCreateOrUpdate(resourceGroupName, workspaceName, resource, context).getFinalResult(); - } - - /** - * The operation to update a Workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param properties Parameters supplied to the Update Workspace 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 Workspace resource along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, - WorkspaceUpdate properties) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, contentType, accept, properties, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * The operation to update a Workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param properties Parameters supplied to the Update Workspace 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 Workspace resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String workspaceName, - WorkspaceUpdate properties) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, contentType, accept, properties, - Context.NONE); - } - - /** - * The operation to update a Workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param properties Parameters supplied to the Update Workspace operation. - * @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 Workspace resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String workspaceName, - WorkspaceUpdate properties, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, contentType, accept, properties, - context); - } - - /** - * The operation to update a Workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param properties Parameters supplied to the Update Workspace operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of model that represents a Workspace resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkspaceInner> beginUpdateAsync(String resourceGroupName, - String workspaceName, WorkspaceUpdate properties) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, workspaceName, properties); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - WorkspaceInner.class, WorkspaceInner.class, this.client.getContext()); - } - - /** - * The operation to update a Workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param properties Parameters supplied to the Update Workspace operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of model that represents a Workspace resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkspaceInner> beginUpdate(String resourceGroupName, - String workspaceName, WorkspaceUpdate properties) { - Response response = updateWithResponse(resourceGroupName, workspaceName, properties); - return this.client.getLroResult(response, WorkspaceInner.class, - WorkspaceInner.class, Context.NONE); - } - - /** - * The operation to update a Workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param properties Parameters supplied to the Update Workspace operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of model that represents a Workspace resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkspaceInner> beginUpdate(String resourceGroupName, - String workspaceName, WorkspaceUpdate properties, Context context) { - Response response = updateWithResponse(resourceGroupName, workspaceName, properties, context); - return this.client.getLroResult(response, WorkspaceInner.class, - WorkspaceInner.class, context); - } - - /** - * The operation to update a Workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param properties Parameters supplied to the Update Workspace 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 Workspace resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String workspaceName, - WorkspaceUpdate properties) { - return beginUpdateAsync(resourceGroupName, workspaceName, properties).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * The operation to update a Workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param properties Parameters supplied to the Update Workspace 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 Workspace resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceInner update(String resourceGroupName, String workspaceName, WorkspaceUpdate properties) { - return beginUpdate(resourceGroupName, workspaceName, properties).getFinalResult(); - } - - /** - * The operation to update a Workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param properties Parameters supplied to the Update Workspace operation. - * @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 Workspace resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceInner update(String resourceGroupName, String workspaceName, WorkspaceUpdate properties, - Context context) { - return beginUpdate(resourceGroupName, workspaceName, properties, context).getFinalResult(); - } - - /** - * Delete a Workspace resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName) { - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a Workspace resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String workspaceName) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, Context.NONE); - } - - /** - * Delete a Workspace resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String workspaceName, Context context) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, context); - } - - /** - * Delete a Workspace resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete a Workspace resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName) { - Response response = deleteWithResponse(resourceGroupName, workspaceName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); - } - - /** - * Delete a Workspace resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, - Context context) { - Response response = deleteWithResponse(resourceGroupName, workspaceName, context); - return this.client.getLroResult(response, Void.class, Void.class, context); - } - - /** - * Delete a Workspace resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName) { - return beginDeleteAsync(resourceGroupName, workspaceName).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a Workspace resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName) { - beginDelete(resourceGroupName, workspaceName).getFinalResult(); - } - - /** - * Delete a Workspace resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, Context context) { - beginDelete(resourceGroupName, workspaceName, context).getFinalResult(); - } - - /** - * Get a list of Workspace resources in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 Workspace resources in a resource group along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - String continuationToken) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, 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 Workspace resources in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 Workspace resources in a resource group as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, String continuationToken) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, continuationToken), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Get a list of Workspace resources in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Workspace resources in a resource group as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - final String continuationToken = null; - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, continuationToken), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Get a list of Workspace resources in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 Workspace resources in a resource group along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, - String continuationToken) { - final String accept = "application/json"; - Response res - = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, continuationToken, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get a list of Workspace resources in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 Workspace resources in a resource group along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, - String continuationToken, Context context) { - final String accept = "application/json"; - Response res - = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, continuationToken, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get a list of Workspace resources in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Workspace resources in a resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - final String continuationToken = null; - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, continuationToken), - nextLink -> listNextSinglePage(nextLink)); - } - - /** - * Get a list of Workspace resources in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 Workspace resources in a resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, String continuationToken, - Context context) { - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, continuationToken, context), - nextLink -> listNextSinglePage(nextLink, context)); - } - - /** - * Get a list of all Workspace resources in a subscription. - * - * @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 all Workspace resources in a subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String continuationToken) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), 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 all Workspace resources in a subscription. - * - * @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 all Workspace resources in a subscription as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String continuationToken) { - return new PagedFlux<>(() -> listSinglePageAsync(continuationToken), - nextLink -> listAllNextSinglePageAsync(nextLink)); - } - - /** - * Get a list of all Workspace 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 all Workspace resources in a subscription as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - final String continuationToken = null; - return new PagedFlux<>(() -> listSinglePageAsync(continuationToken), - nextLink -> listAllNextSinglePageAsync(nextLink)); - } - - /** - * Get a list of all Workspace resources in a subscription. - * - * @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 all Workspace resources in a subscription along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String continuationToken) { - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), continuationToken, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get a list of all Workspace resources in a subscription. - * - * @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 all Workspace resources in a subscription along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String continuationToken, Context context) { - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), continuationToken, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get a list of all Workspace 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 all Workspace resources in a subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - final String continuationToken = null; - return new PagedIterable<>(() -> listSinglePage(continuationToken), - nextLink -> listAllNextSinglePage(nextLink)); - } - - /** - * Get a list of all Workspace resources in a subscription. - * - * @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 all Workspace resources in a subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String continuationToken, Context context) { - return new PagedIterable<>(() -> listSinglePage(continuationToken, context), - nextLink -> listAllNextSinglePage(nextLink, context)); - } - - /** - * Refreshes recommendation status for all scenarios in a given workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> refreshRecommendationsWithResponseAsync(String resourceGroupName, - String workspaceName) { - return FluxUtil - .withContext( - context -> service.refreshRecommendations(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Refreshes recommendation status for all scenarios in a given workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response refreshRecommendationsWithResponse(String resourceGroupName, String workspaceName) { - return service.refreshRecommendationsSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, Context.NONE); - } - - /** - * Refreshes recommendation status for all scenarios in a given workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response refreshRecommendationsWithResponse(String resourceGroupName, String workspaceName, - Context context) { - return service.refreshRecommendationsSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, context); - } - - /** - * Refreshes recommendation status for all scenarios in a given workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkspaceEvaluation> - beginRefreshRecommendationsAsync(String resourceGroupName, String workspaceName) { - Mono>> mono - = refreshRecommendationsWithResponseAsync(resourceGroupName, workspaceName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - WorkspaceEvaluation.class, WorkspaceEvaluation.class, this.client.getContext()); - } - - /** - * Refreshes recommendation status for all scenarios in a given workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkspaceEvaluation> - beginRefreshRecommendations(String resourceGroupName, String workspaceName) { - Response response = refreshRecommendationsWithResponse(resourceGroupName, workspaceName); - return this.client.getLroResult(response, WorkspaceEvaluation.class, - WorkspaceEvaluation.class, Context.NONE); - } - - /** - * Refreshes recommendation status for all scenarios in a given workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkspaceEvaluation> - beginRefreshRecommendations(String resourceGroupName, String workspaceName, Context context) { - Response response = refreshRecommendationsWithResponse(resourceGroupName, workspaceName, context); - return this.client.getLroResult(response, WorkspaceEvaluation.class, - WorkspaceEvaluation.class, context); - } - - /** - * Refreshes recommendation status for all scenarios in a given workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono refreshRecommendationsAsync(String resourceGroupName, String workspaceName) { - return beginRefreshRecommendationsAsync(resourceGroupName, workspaceName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Refreshes recommendation status for all scenarios in a given workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceEvaluation refreshRecommendations(String resourceGroupName, String workspaceName) { - return beginRefreshRecommendations(resourceGroupName, workspaceName).getFinalResult(); - } - - /** - * Refreshes recommendation status for all scenarios in a given workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceEvaluation refreshRecommendations(String resourceGroupName, String workspaceName, Context context) { - return beginRefreshRecommendations(resourceGroupName, workspaceName, context).getFinalResult(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Workspace resources in a resource group along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Workspace resources in a resource group along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return 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. - * @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 Workspace resources in a resource group along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink, Context context) { - final String accept = "application/json"; - Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); - return 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. - * @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 all Workspace resources in a subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listAllNextSinglePageAsync(String nextLink) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listAllNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of all Workspace resources in a subscription along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listAllNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listAllNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return 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. - * @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 all Workspace resources in a subscription along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listAllNextSinglePage(String nextLink, Context context) { - final String accept = "application/json"; - Response res - = service.listAllNextSync(nextLink, this.client.getEndpoint(), accept, context); - return 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/WorkspacesImpl.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/WorkspacesImpl.java deleted file mode 100644 index d9fe243a52a0..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/WorkspacesImpl.java +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.chaos.fluent.WorkspacesClient; -import com.azure.resourcemanager.chaos.fluent.models.WorkspaceInner; -import com.azure.resourcemanager.chaos.models.Workspace; -import com.azure.resourcemanager.chaos.models.WorkspaceEvaluation; -import com.azure.resourcemanager.chaos.models.Workspaces; - -public final class WorkspacesImpl implements Workspaces { - private static final ClientLogger LOGGER = new ClientLogger(WorkspacesImpl.class); - - private final WorkspacesClient innerClient; - - private final com.azure.resourcemanager.chaos.ChaosManager serviceManager; - - public WorkspacesImpl(WorkspacesClient innerClient, com.azure.resourcemanager.chaos.ChaosManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getByResourceGroupWithResponse(String resourceGroupName, String workspaceName, - Context context) { - Response inner - = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, workspaceName, context); - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new WorkspaceImpl(inner.getValue(), this.manager())); - } - - public Workspace getByResourceGroup(String resourceGroupName, String workspaceName) { - WorkspaceInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, workspaceName); - if (inner != null) { - return new WorkspaceImpl(inner, this.manager()); - } else { - return null; - } - } - - public void deleteByResourceGroup(String resourceGroupName, String workspaceName) { - this.serviceClient().delete(resourceGroupName, workspaceName); - } - - public void delete(String resourceGroupName, String workspaceName, Context context) { - this.serviceClient().delete(resourceGroupName, workspaceName, context); - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, String continuationToken, - Context context) { - PagedIterable inner - = this.serviceClient().listByResourceGroup(resourceGroupName, continuationToken, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); - } - - public PagedIterable list(String continuationToken, Context context) { - PagedIterable inner = this.serviceClient().list(continuationToken, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); - } - - public WorkspaceEvaluation refreshRecommendations(String resourceGroupName, String workspaceName) { - return this.serviceClient().refreshRecommendations(resourceGroupName, workspaceName); - } - - public WorkspaceEvaluation refreshRecommendations(String resourceGroupName, String workspaceName, Context context) { - return this.serviceClient().refreshRecommendations(resourceGroupName, workspaceName, context); - } - - public Workspace getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, workspaceName, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - this.delete(resourceGroupName, workspaceName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - this.delete(resourceGroupName, workspaceName, context); - } - - private WorkspacesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.chaos.ChaosManager manager() { - return this.serviceManager; - } - - public WorkspaceImpl define(String name) { - return new WorkspaceImpl(name, this.manager()); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/ActionListResult.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/ActionListResult.java deleted file mode 100644 index 6cbaff50fbc4..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/ActionListResult.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.implementation.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.chaos.fluent.models.ActionInner; -import java.io.IOException; -import java.util.List; - -/** - * Model that represents a list of Action resources and a link for pagination. - */ -@Immutable -public final class ActionListResult implements JsonSerializable { - /* - * The Action items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of ActionListResult class. - */ - private ActionListResult() { - } - - /** - * Get the value property: The Action items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ActionListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ActionListResult if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ActionListResult. - */ - public static ActionListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ActionListResult deserializedActionListResult = new ActionListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> ActionInner.fromJson(reader1)); - deserializedActionListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedActionListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedActionListResult; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/ActionVersionListResult.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/ActionVersionListResult.java deleted file mode 100644 index 6ecf2dcbef10..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/ActionVersionListResult.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.implementation.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.chaos.fluent.models.ActionVersionInner; -import java.io.IOException; -import java.util.List; - -/** - * Model that represents a list of Action Version resources and a link for pagination. - */ -@Immutable -public final class ActionVersionListResult implements JsonSerializable { - /* - * The ActionVersion items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of ActionVersionListResult class. - */ - private ActionVersionListResult() { - } - - /** - * Get the value property: The ActionVersion items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ActionVersionListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ActionVersionListResult if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ActionVersionListResult. - */ - public static ActionVersionListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ActionVersionListResult deserializedActionVersionListResult = new ActionVersionListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> ActionVersionInner.fromJson(reader1)); - deserializedActionVersionListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedActionVersionListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedActionVersionListResult; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/DiscoveredResourceListResult.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/DiscoveredResourceListResult.java deleted file mode 100644 index ecfc9b5b6795..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/DiscoveredResourceListResult.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.implementation.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.chaos.fluent.models.DiscoveredResourceInner; -import java.io.IOException; -import java.util.List; - -/** - * Model that represents a list of discovered resources and a link for pagination. - */ -@Immutable -public final class DiscoveredResourceListResult implements JsonSerializable { - /* - * The DiscoveredResource items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of DiscoveredResourceListResult class. - */ - private DiscoveredResourceListResult() { - } - - /** - * Get the value property: The DiscoveredResource items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DiscoveredResourceListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DiscoveredResourceListResult if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the DiscoveredResourceListResult. - */ - public static DiscoveredResourceListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DiscoveredResourceListResult deserializedDiscoveredResourceListResult = new DiscoveredResourceListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> DiscoveredResourceInner.fromJson(reader1)); - deserializedDiscoveredResourceListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedDiscoveredResourceListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDiscoveredResourceListResult; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/PrivateAccessListResult.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/PrivateAccessListResult.java deleted file mode 100644 index f510943038b7..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/PrivateAccessListResult.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.implementation.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.chaos.fluent.models.PrivateAccessInner; -import java.io.IOException; -import java.util.List; - -/** - * Model that represents a list of private access resources and a link for pagination. - */ -@Immutable -public final class PrivateAccessListResult implements JsonSerializable { - /* - * The PrivateAccess items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of PrivateAccessListResult class. - */ - private PrivateAccessListResult() { - } - - /** - * Get the value property: The PrivateAccess items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PrivateAccessListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateAccessListResult if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the PrivateAccessListResult. - */ - public static PrivateAccessListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateAccessListResult deserializedPrivateAccessListResult = new PrivateAccessListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> PrivateAccessInner.fromJson(reader1)); - deserializedPrivateAccessListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedPrivateAccessListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateAccessListResult; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/PrivateEndpointConnectionListResult.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/PrivateEndpointConnectionListResult.java deleted file mode 100644 index 47f8d1c11ebe..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/PrivateEndpointConnectionListResult.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.implementation.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.chaos.fluent.models.PrivateEndpointConnectionInner; -import java.io.IOException; -import java.util.List; - -/** - * A list of private link resources. - */ -@Immutable -public final class PrivateEndpointConnectionListResult - implements JsonSerializable { - /* - * The PrivateEndpointConnection items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of PrivateEndpointConnectionListResult class. - */ - private PrivateEndpointConnectionListResult() { - } - - /** - * Get the value property: The PrivateEndpointConnection items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PrivateEndpointConnectionListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateEndpointConnectionListResult if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the PrivateEndpointConnectionListResult. - */ - public static PrivateEndpointConnectionListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateEndpointConnectionListResult deserializedPrivateEndpointConnectionListResult - = new PrivateEndpointConnectionListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> PrivateEndpointConnectionInner.fromJson(reader1)); - deserializedPrivateEndpointConnectionListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedPrivateEndpointConnectionListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateEndpointConnectionListResult; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/ScenarioConfigurationListResult.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/ScenarioConfigurationListResult.java deleted file mode 100644 index 210b31af9d38..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/ScenarioConfigurationListResult.java +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.implementation.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.chaos.fluent.models.ScenarioConfigurationInner; -import java.io.IOException; -import java.util.List; - -/** - * Model that represents a list of scenario configurations and a link for pagination. - */ -@Immutable -public final class ScenarioConfigurationListResult implements JsonSerializable { - /* - * The ScenarioConfiguration items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of ScenarioConfigurationListResult class. - */ - private ScenarioConfigurationListResult() { - } - - /** - * Get the value property: The ScenarioConfiguration items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ScenarioConfigurationListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ScenarioConfigurationListResult if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ScenarioConfigurationListResult. - */ - public static ScenarioConfigurationListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ScenarioConfigurationListResult deserializedScenarioConfigurationListResult - = new ScenarioConfigurationListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> ScenarioConfigurationInner.fromJson(reader1)); - deserializedScenarioConfigurationListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedScenarioConfigurationListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedScenarioConfigurationListResult; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/ScenarioListResult.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/ScenarioListResult.java deleted file mode 100644 index dc143ae3287d..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/ScenarioListResult.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.implementation.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.chaos.fluent.models.ScenarioInner; -import java.io.IOException; -import java.util.List; - -/** - * Model that represents a list of scenarios and a link for pagination. - */ -@Immutable -public final class ScenarioListResult implements JsonSerializable { - /* - * The Scenario items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of ScenarioListResult class. - */ - private ScenarioListResult() { - } - - /** - * Get the value property: The Scenario items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ScenarioListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ScenarioListResult if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ScenarioListResult. - */ - public static ScenarioListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ScenarioListResult deserializedScenarioListResult = new ScenarioListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> ScenarioInner.fromJson(reader1)); - deserializedScenarioListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedScenarioListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedScenarioListResult; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/ScenarioRunListResult.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/ScenarioRunListResult.java deleted file mode 100644 index 5a466e012486..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/ScenarioRunListResult.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.implementation.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.chaos.fluent.models.ScenarioRunInner; -import java.io.IOException; -import java.util.List; - -/** - * Model that represents a list of scenario runs and a link for pagination. - */ -@Immutable -public final class ScenarioRunListResult implements JsonSerializable { - /* - * The ScenarioRun items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of ScenarioRunListResult class. - */ - private ScenarioRunListResult() { - } - - /** - * Get the value property: The ScenarioRun items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ScenarioRunListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ScenarioRunListResult if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ScenarioRunListResult. - */ - public static ScenarioRunListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ScenarioRunListResult deserializedScenarioRunListResult = new ScenarioRunListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> ScenarioRunInner.fromJson(reader1)); - deserializedScenarioRunListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedScenarioRunListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedScenarioRunListResult; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/WorkspaceListResult.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/WorkspaceListResult.java deleted file mode 100644 index 4ad6d6c43899..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/implementation/models/WorkspaceListResult.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.implementation.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.chaos.fluent.models.WorkspaceInner; -import java.io.IOException; -import java.util.List; - -/** - * Model that represents a list of Workspace resources and a link for pagination. - */ -@Immutable -public final class WorkspaceListResult implements JsonSerializable { - /* - * The Workspace items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of WorkspaceListResult class. - */ - private WorkspaceListResult() { - } - - /** - * Get the value property: The Workspace items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of WorkspaceListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of WorkspaceListResult if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the WorkspaceListResult. - */ - public static WorkspaceListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - WorkspaceListResult deserializedWorkspaceListResult = new WorkspaceListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> WorkspaceInner.fromJson(reader1)); - deserializedWorkspaceListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedWorkspaceListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedWorkspaceListResult; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Action.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Action.java deleted file mode 100644 index 7a26c069bd20..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Action.java +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.chaos.fluent.models.ActionInner; -import java.util.List; - -/** - * An immutable client-side representation of Action. - */ -public interface Action { - /** - * 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: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the canonicalId property: Canonical identifier of the action (e.g., "microsoft-compute-shutdown/1.0"). - * - * @return the canonicalId value. - */ - String canonicalId(); - - /** - * Gets the displayName property: Human-readable display name of the action. - * - * @return the displayName value. - */ - String displayName(); - - /** - * Gets the description property: Description of what this action does. - * - * @return the description value. - */ - String description(); - - /** - * Gets the actionName property: The short name of the action (e.g., "Shutdown"). - * - * @return the actionName value. - */ - String actionName(); - - /** - * Gets the version property: The version of the action (e.g., "1.0.0"). - * - * @return the version value. - */ - String version(); - - /** - * Gets the actionType property: The type of the action. - * - * @return the actionType value. - */ - ActionKind actionType(); - - /** - * Gets the supportedTargetTypes property: List of target types supported by this action. - * - * @return the supportedTargetTypes value. - */ - List supportedTargetTypes(); - - /** - * Gets the parametersSchema property: JSON Schema describing the parameters for this action. - * - * @return the parametersSchema value. - */ - ActionPropertiesParametersSchema parametersSchema(); - - /** - * Gets the recommendedRoles property: Recommended Azure RBAC role definition GUIDs for this action. - * - * @return the recommendedRoles value. - */ - List recommendedRoles(); - - /** - * Gets the inner com.azure.resourcemanager.chaos.fluent.models.ActionInner object. - * - * @return the inner object. - */ - ActionInner innerModel(); -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionDependency.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionDependency.java deleted file mode 100644 index 98fecebc3ca3..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionDependency.java +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Model that represents an action dependency. - */ -@Fluent -public final class ActionDependency implements JsonSerializable { - /* - * The type of dependency. - */ - private ActionDependencyType type; - - /* - * Name of the action this depends on. - */ - private String name; - - /* - * The lifecycle state of the dependency action that triggers this action to start. - */ - private ActionLifecycle onActionLifecycle; - - /** - * Creates an instance of ActionDependency class. - */ - public ActionDependency() { - } - - /** - * Get the type property: The type of dependency. - * - * @return the type value. - */ - public ActionDependencyType type() { - return this.type; - } - - /** - * Set the type property: The type of dependency. - * - * @param type the type value to set. - * @return the ActionDependency object itself. - */ - public ActionDependency withType(ActionDependencyType type) { - this.type = type; - return this; - } - - /** - * Get the name property: Name of the action this depends on. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Name of the action this depends on. - * - * @param name the name value to set. - * @return the ActionDependency object itself. - */ - public ActionDependency withName(String name) { - this.name = name; - return this; - } - - /** - * Get the onActionLifecycle property: The lifecycle state of the dependency action that triggers this action to - * start. - * - * @return the onActionLifecycle value. - */ - public ActionLifecycle onActionLifecycle() { - return this.onActionLifecycle; - } - - /** - * Set the onActionLifecycle property: The lifecycle state of the dependency action that triggers this action to - * start. - * - * @param onActionLifecycle the onActionLifecycle value to set. - * @return the ActionDependency object itself. - */ - public ActionDependency withOnActionLifecycle(ActionLifecycle onActionLifecycle) { - this.onActionLifecycle = onActionLifecycle; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("onActionLifecycle", - this.onActionLifecycle == null ? null : this.onActionLifecycle.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ActionDependency from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ActionDependency if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ActionDependency. - */ - public static ActionDependency fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ActionDependency deserializedActionDependency = new ActionDependency(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("type".equals(fieldName)) { - deserializedActionDependency.type = ActionDependencyType.fromString(reader.getString()); - } else if ("name".equals(fieldName)) { - deserializedActionDependency.name = reader.getString(); - } else if ("onActionLifecycle".equals(fieldName)) { - deserializedActionDependency.onActionLifecycle = ActionLifecycle.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedActionDependency; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionDependencyType.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionDependencyType.java deleted file mode 100644 index 5eeefb1eb653..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionDependencyType.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Enum for action dependency type. - */ -public final class ActionDependencyType extends ExpandableStringEnum { - /** - * Action dependency type. - */ - public static final ActionDependencyType ACTION = fromString("Action"); - - /** - * Creates a new instance of ActionDependencyType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ActionDependencyType() { - } - - /** - * Creates or finds a ActionDependencyType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ActionDependencyType. - */ - public static ActionDependencyType fromString(String name) { - return fromString(name, ActionDependencyType.class); - } - - /** - * Gets known ActionDependencyType values. - * - * @return known ActionDependencyType values. - */ - public static Collection values() { - return values(ActionDependencyType.class); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionKind.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionKind.java deleted file mode 100644 index d1c9b9e2a125..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionKind.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Union of action types. - */ -public final class ActionKind extends ExpandableStringEnum { - /** - * Discrete action type. - */ - public static final ActionKind DISCRETE = fromString("Discrete"); - - /** - * Continuous action type. - */ - public static final ActionKind CONTINUOUS = fromString("Continuous"); - - /** - * Cancelable action type. - */ - public static final ActionKind CANCELABLE = fromString("Cancelable"); - - /** - * Creates a new instance of ActionKind value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ActionKind() { - } - - /** - * Creates or finds a ActionKind from its string representation. - * - * @param name a name to look for. - * @return the corresponding ActionKind. - */ - public static ActionKind fromString(String name) { - return fromString(name, ActionKind.class); - } - - /** - * Gets known ActionKind values. - * - * @return known ActionKind values. - */ - public static Collection values() { - return values(ActionKind.class); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionLifecycle.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionLifecycle.java deleted file mode 100644 index e12bcdba07ae..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionLifecycle.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Enum for action lifecycle states. - */ -public final class ActionLifecycle extends ExpandableStringEnum { - /** - * Trigger when action reaches any terminal state. - */ - public static final ActionLifecycle ANY_TERMINAL = fromString("AnyTerminal"); - - /** - * Trigger when action starts. - */ - public static final ActionLifecycle START = fromString("Start"); - - /** - * Trigger when action is running. - */ - public static final ActionLifecycle RUNNING = fromString("Running"); - - /** - * Trigger on success. - */ - public static final ActionLifecycle SUCCESS = fromString("Success"); - - /** - * Trigger on failure. - */ - public static final ActionLifecycle FAILURE = fromString("Failure"); - - /** - * Trigger when action is skipped. - */ - public static final ActionLifecycle SKIPPED = fromString("Skipped"); - - /** - * Creates a new instance of ActionLifecycle value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ActionLifecycle() { - } - - /** - * Creates or finds a ActionLifecycle from its string representation. - * - * @param name a name to look for. - * @return the corresponding ActionLifecycle. - */ - public static ActionLifecycle fromString(String name) { - return fromString(name, ActionLifecycle.class); - } - - /** - * Gets known ActionLifecycle values. - * - * @return known ActionLifecycle values. - */ - public static Collection values() { - return values(ActionLifecycle.class); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionPropertiesParametersSchema.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionPropertiesParametersSchema.java deleted file mode 100644 index 7fd7cac761d6..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionPropertiesParametersSchema.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The ActionPropertiesParametersSchema model. - */ -@Immutable -public final class ActionPropertiesParametersSchema implements JsonSerializable { - /** - * Creates an instance of ActionPropertiesParametersSchema class. - */ - private ActionPropertiesParametersSchema() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ActionPropertiesParametersSchema from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ActionPropertiesParametersSchema if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ActionPropertiesParametersSchema. - */ - public static ActionPropertiesParametersSchema fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ActionPropertiesParametersSchema deserializedActionPropertiesParametersSchema - = new ActionPropertiesParametersSchema(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - reader.skipChildren(); - } - - return deserializedActionPropertiesParametersSchema; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionSupportedTargetType.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionSupportedTargetType.java deleted file mode 100644 index b0db91a883c5..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionSupportedTargetType.java +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Model that represents a target type supported by an action. - */ -@Immutable -public final class ActionSupportedTargetType implements JsonSerializable { - /* - * The Azure resource type (e.g., "Microsoft.Compute/virtualMachines"). - */ - private String targetType; - - /* - * List of Azure permissions required for this target type. - */ - private List requiredPermissions; - - /** - * Creates an instance of ActionSupportedTargetType class. - */ - private ActionSupportedTargetType() { - } - - /** - * Get the targetType property: The Azure resource type (e.g., "Microsoft.Compute/virtualMachines"). - * - * @return the targetType value. - */ - public String targetType() { - return this.targetType; - } - - /** - * Get the requiredPermissions property: List of Azure permissions required for this target type. - * - * @return the requiredPermissions value. - */ - public List requiredPermissions() { - return this.requiredPermissions; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("targetType", this.targetType); - jsonWriter.writeArrayField("requiredPermissions", this.requiredPermissions, - (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ActionSupportedTargetType from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ActionSupportedTargetType if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ActionSupportedTargetType. - */ - public static ActionSupportedTargetType fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ActionSupportedTargetType deserializedActionSupportedTargetType = new ActionSupportedTargetType(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("targetType".equals(fieldName)) { - deserializedActionSupportedTargetType.targetType = reader.getString(); - } else if ("requiredPermissions".equals(fieldName)) { - List requiredPermissions = reader.readArray(reader1 -> reader1.getString()); - deserializedActionSupportedTargetType.requiredPermissions = requiredPermissions; - } else { - reader.skipChildren(); - } - } - - return deserializedActionSupportedTargetType; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionVersion.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionVersion.java deleted file mode 100644 index a13a1121787b..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionVersion.java +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.chaos.fluent.models.ActionVersionInner; -import java.util.List; - -/** - * An immutable client-side representation of ActionVersion. - */ -public interface ActionVersion { - /** - * 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: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the canonicalId property: Canonical identifier of the action (e.g., "microsoft-compute-shutdown/1.0"). - * - * @return the canonicalId value. - */ - String canonicalId(); - - /** - * Gets the displayName property: Human-readable display name of the action. - * - * @return the displayName value. - */ - String displayName(); - - /** - * Gets the description property: Description of what this action does. - * - * @return the description value. - */ - String description(); - - /** - * Gets the actionName property: The short name of the action (e.g., "Shutdown"). - * - * @return the actionName value. - */ - String actionName(); - - /** - * Gets the version property: The version of the action (e.g., "1.0.0"). - * - * @return the version value. - */ - String version(); - - /** - * Gets the actionType property: The type of the action. - * - * @return the actionType value. - */ - ActionKind actionType(); - - /** - * Gets the supportedTargetTypes property: List of target types supported by this action. - * - * @return the supportedTargetTypes value. - */ - List supportedTargetTypes(); - - /** - * Gets the parametersSchema property: JSON Schema describing the parameters for this action. - * - * @return the parametersSchema value. - */ - ActionPropertiesParametersSchema parametersSchema(); - - /** - * Gets the recommendedRoles property: Recommended Azure RBAC role definition GUIDs for this action. - * - * @return the recommendedRoles value. - */ - List recommendedRoles(); - - /** - * Gets the inner com.azure.resourcemanager.chaos.fluent.models.ActionVersionInner object. - * - * @return the inner object. - */ - ActionVersionInner innerModel(); -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionVersions.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionVersions.java deleted file mode 100644 index fa6b2361dd1d..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ActionVersions.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of ActionVersions. - */ -public interface ActionVersions { - /** - * Get an Action Version resource for a given location and action. - * - * @param location The name of the Azure region. - * @param actionName String that represents an Action resource name. - * @param versionName String that represents an Action Version resource name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Action Version resource for a given location and action along with {@link Response}. - */ - Response getWithResponse(String location, String actionName, String versionName, Context context); - - /** - * Get an Action Version resource for a given location and action. - * - * @param location The name of the Azure region. - * @param actionName String that represents an Action resource name. - * @param versionName String that represents an Action Version 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 an Action Version resource for a given location and action. - */ - ActionVersion get(String location, String actionName, String versionName); - - /** - * Get a list of Action Version resources for a given location and action. - * - * @param location The name of the Azure region. - * @param actionName String that represents an Action 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 Action Version resources for a given location and action as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(String location, String actionName); - - /** - * Get a list of Action Version resources for a given location and action. - * - * @param location The name of the Azure region. - * @param actionName String that represents an Action resource name. - * @param continuationToken String that sets the continuation token. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Action Version resources for a given location and action as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(String location, String actionName, String continuationToken, Context context); -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Actions.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Actions.java deleted file mode 100644 index 2589636bf0f1..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Actions.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of Actions. - */ -public interface Actions { - /** - * Get an Action resource for a given location. - * - * @param location The name of the Azure region. - * @param actionName String that represents an Action resource name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Action resource for a given location along with {@link Response}. - */ - Response getWithResponse(String location, String actionName, Context context); - - /** - * Get an Action resource for a given location. - * - * @param location The name of the Azure region. - * @param actionName String that represents an Action 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 an Action resource for a given location. - */ - Action get(String location, String actionName); - - /** - * Get a list of Action resources for a given location. - * - * @param location The name of the Azure region. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Action resources for a given location as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String location); - - /** - * Get a list of Action resources for a given location. - * - * @param location The name of the Azure region. - * @param continuationToken String that sets the continuation token. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 Action resources for a given location as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String location, String continuationToken, Context context); -} 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 5d2cb354722f..515aef4335a8 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 @@ -74,14 +74,6 @@ public interface Capability { */ String urn(); - /** - * Gets the provisioningState property: Resource provisioning state. Not currently in use because resource is - * created synchronously. - * - * @return the provisioningState value. - */ - ProvisioningState provisioningState(); - /** * Gets the inner com.azure.resourcemanager.chaos.fluent.models.CapabilityInner object. * diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ConfigurationExclusions.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ConfigurationExclusions.java deleted file mode 100644 index c35646799c9a..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ConfigurationExclusions.java +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Model that represents exclusion criteria for protecting resources from fault injection. - * Uses union (OR) logic - a resource is excluded if it matches ANY criteria. - */ -@Fluent -public final class ConfigurationExclusions implements JsonSerializable { - /* - * Array of specific resource IDs to exclude from fault injection. - */ - private List resources; - - /* - * Array of tag key-value pairs. Resources with matching tags are excluded. - */ - private List tags; - - /* - * Array of resource types. All resources of these types are excluded. - */ - private List types; - - /** - * Creates an instance of ConfigurationExclusions class. - */ - public ConfigurationExclusions() { - } - - /** - * Get the resources property: Array of specific resource IDs to exclude from fault injection. - * - * @return the resources value. - */ - public List resources() { - return this.resources; - } - - /** - * Set the resources property: Array of specific resource IDs to exclude from fault injection. - * - * @param resources the resources value to set. - * @return the ConfigurationExclusions object itself. - */ - public ConfigurationExclusions withResources(List resources) { - this.resources = resources; - return this; - } - - /** - * Get the tags property: Array of tag key-value pairs. Resources with matching tags are excluded. - * - * @return the tags value. - */ - public List tags() { - return this.tags; - } - - /** - * Set the tags property: Array of tag key-value pairs. Resources with matching tags are excluded. - * - * @param tags the tags value to set. - * @return the ConfigurationExclusions object itself. - */ - public ConfigurationExclusions withTags(List tags) { - this.tags = tags; - return this; - } - - /** - * Get the types property: Array of resource types. All resources of these types are excluded. - * - * @return the types value. - */ - public List types() { - return this.types; - } - - /** - * Set the types property: Array of resource types. All resources of these types are excluded. - * - * @param types the types value to set. - * @return the ConfigurationExclusions object itself. - */ - public ConfigurationExclusions withTypes(List types) { - this.types = types; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("resources", this.resources, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("tags", this.tags, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("types", this.types, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ConfigurationExclusions from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ConfigurationExclusions if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the ConfigurationExclusions. - */ - public static ConfigurationExclusions fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ConfigurationExclusions deserializedConfigurationExclusions = new ConfigurationExclusions(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("resources".equals(fieldName)) { - List resources = reader.readArray(reader1 -> reader1.getString()); - deserializedConfigurationExclusions.resources = resources; - } else if ("tags".equals(fieldName)) { - List tags = reader.readArray(reader1 -> KeyValuePair.fromJson(reader1)); - deserializedConfigurationExclusions.tags = tags; - } else if ("types".equals(fieldName)) { - List types = reader.readArray(reader1 -> reader1.getString()); - deserializedConfigurationExclusions.types = types; - } else { - reader.skipChildren(); - } - } - - return deserializedConfigurationExclusions; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ConfigurationFilters.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ConfigurationFilters.java deleted file mode 100644 index 6d944b2c8d55..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ConfigurationFilters.java +++ /dev/null @@ -1,203 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Model that represents filter criteria for constraining which discovered - * resources participate in fault injection. - * - * Uses intersection (AND) logic — a resource is included only if it matches all criteria. - */ -@Fluent -public final class ConfigurationFilters implements JsonSerializable { - /* - * Array of Azure location strings. Only resources in these locations are included. - * - * Null or omitted means all locations (no filter). Empty array means include nothing. - */ - private List locations; - - /* - * Array of availability zone identifiers ("1", "2", "3", "zone-redundant"). - * Only resources whose zones intersect this list are included. - * - * Null or omitted means all zones (including non-zonal). Empty array means include nothing. - * - * Mutually exclusive with `physicalZones` — set one or the other, not both. - */ - private List zones; - - /* - * Array of physical availability zone identifiers in `{region}-az{N}` format - * (e.g., `"westus2-az1"`). Only resources in the corresponding logical zone - * for each subscription are included. - * - * At execution time, each physical zone is resolved to per-subscription - * logical zones via the Azure locations API. The resolved mapping is surfaced - * on the scenario run response (`zoneResolution`). - * - * Null or omitted means physical zone targeting is not used. - * Only one physical zone is supported in preview. - * - * Mutually exclusive with `zones` — set one or the other, not both. - */ - private List physicalZones; - - /** - * Creates an instance of ConfigurationFilters class. - */ - public ConfigurationFilters() { - } - - /** - * Get the locations property: Array of Azure location strings. Only resources in these locations are included. - * - * Null or omitted means all locations (no filter). Empty array means include nothing. - * - * @return the locations value. - */ - public List locations() { - return this.locations; - } - - /** - * Set the locations property: Array of Azure location strings. Only resources in these locations are included. - * - * Null or omitted means all locations (no filter). Empty array means include nothing. - * - * @param locations the locations value to set. - * @return the ConfigurationFilters object itself. - */ - public ConfigurationFilters withLocations(List locations) { - this.locations = locations; - return this; - } - - /** - * Get the zones property: Array of availability zone identifiers ("1", "2", "3", "zone-redundant"). - * Only resources whose zones intersect this list are included. - * - * Null or omitted means all zones (including non-zonal). Empty array means include nothing. - * - * Mutually exclusive with `physicalZones` — set one or the other, not both. - * - * @return the zones value. - */ - public List zones() { - return this.zones; - } - - /** - * Set the zones property: Array of availability zone identifiers ("1", "2", "3", "zone-redundant"). - * Only resources whose zones intersect this list are included. - * - * Null or omitted means all zones (including non-zonal). Empty array means include nothing. - * - * Mutually exclusive with `physicalZones` — set one or the other, not both. - * - * @param zones the zones value to set. - * @return the ConfigurationFilters object itself. - */ - public ConfigurationFilters withZones(List zones) { - this.zones = zones; - return this; - } - - /** - * Get the physicalZones property: Array of physical availability zone identifiers in `{region}-az{N}` format - * (e.g., `"westus2-az1"`). Only resources in the corresponding logical zone - * for each subscription are included. - * - * At execution time, each physical zone is resolved to per-subscription - * logical zones via the Azure locations API. The resolved mapping is surfaced - * on the scenario run response (`zoneResolution`). - * - * Null or omitted means physical zone targeting is not used. - * Only one physical zone is supported in preview. - * - * Mutually exclusive with `zones` — set one or the other, not both. - * - * @return the physicalZones value. - */ - public List physicalZones() { - return this.physicalZones; - } - - /** - * Set the physicalZones property: Array of physical availability zone identifiers in `{region}-az{N}` format - * (e.g., `"westus2-az1"`). Only resources in the corresponding logical zone - * for each subscription are included. - * - * At execution time, each physical zone is resolved to per-subscription - * logical zones via the Azure locations API. The resolved mapping is surfaced - * on the scenario run response (`zoneResolution`). - * - * Null or omitted means physical zone targeting is not used. - * Only one physical zone is supported in preview. - * - * Mutually exclusive with `zones` — set one or the other, not both. - * - * @param physicalZones the physicalZones value to set. - * @return the ConfigurationFilters object itself. - */ - public ConfigurationFilters withPhysicalZones(List physicalZones) { - this.physicalZones = physicalZones; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("locations", this.locations, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("zones", this.zones, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("physicalZones", this.physicalZones, - (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ConfigurationFilters from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ConfigurationFilters if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the ConfigurationFilters. - */ - public static ConfigurationFilters fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ConfigurationFilters deserializedConfigurationFilters = new ConfigurationFilters(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("locations".equals(fieldName)) { - List locations = reader.readArray(reader1 -> reader1.getString()); - deserializedConfigurationFilters.locations = locations; - } else if ("zones".equals(fieldName)) { - List zones = reader.readArray(reader1 -> reader1.getString()); - deserializedConfigurationFilters.zones = zones; - } else if ("physicalZones".equals(fieldName)) { - List physicalZones = reader.readArray(reader1 -> reader1.getString()); - deserializedConfigurationFilters.physicalZones = physicalZones; - } else { - reader.skipChildren(); - } - } - - return deserializedConfigurationFilters; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/CustomerDataStorageProperties.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/CustomerDataStorageProperties.java deleted file mode 100644 index f0d7b40f006a..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/CustomerDataStorageProperties.java +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Model that represents the Customer Managed Storage for an Experiment. - */ -@Fluent -public final class CustomerDataStorageProperties implements JsonSerializable { - /* - * Azure Resource ID of the Storage account to use for Customer Data storage. - */ - private String storageAccountResourceId; - - /* - * Name of the Azure Blob Storage container to use or create. - */ - private String blobContainerName; - - /** - * Creates an instance of CustomerDataStorageProperties class. - */ - public CustomerDataStorageProperties() { - } - - /** - * Get the storageAccountResourceId property: Azure Resource ID of the Storage account to use for Customer Data - * storage. - * - * @return the storageAccountResourceId value. - */ - public String storageAccountResourceId() { - return this.storageAccountResourceId; - } - - /** - * Set the storageAccountResourceId property: Azure Resource ID of the Storage account to use for Customer Data - * storage. - * - * @param storageAccountResourceId the storageAccountResourceId value to set. - * @return the CustomerDataStorageProperties object itself. - */ - public CustomerDataStorageProperties withStorageAccountResourceId(String storageAccountResourceId) { - this.storageAccountResourceId = storageAccountResourceId; - return this; - } - - /** - * Get the blobContainerName property: Name of the Azure Blob Storage container to use or create. - * - * @return the blobContainerName value. - */ - public String blobContainerName() { - return this.blobContainerName; - } - - /** - * Set the blobContainerName property: Name of the Azure Blob Storage container to use or create. - * - * @param blobContainerName the blobContainerName value to set. - * @return the CustomerDataStorageProperties object itself. - */ - public CustomerDataStorageProperties withBlobContainerName(String blobContainerName) { - this.blobContainerName = blobContainerName; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("storageAccountResourceId", this.storageAccountResourceId); - jsonWriter.writeStringField("blobContainerName", this.blobContainerName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CustomerDataStorageProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CustomerDataStorageProperties if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the CustomerDataStorageProperties. - */ - public static CustomerDataStorageProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CustomerDataStorageProperties deserializedCustomerDataStorageProperties - = new CustomerDataStorageProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("storageAccountResourceId".equals(fieldName)) { - deserializedCustomerDataStorageProperties.storageAccountResourceId = reader.getString(); - } else if ("blobContainerName".equals(fieldName)) { - deserializedCustomerDataStorageProperties.blobContainerName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedCustomerDataStorageProperties; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/DiscoveredResource.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/DiscoveredResource.java deleted file mode 100644 index e99059bbc7a5..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/DiscoveredResource.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.chaos.fluent.models.DiscoveredResourceInner; - -/** - * An immutable client-side representation of DiscoveredResource. - */ -public interface DiscoveredResource { - /** - * 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 properties property: The properties of the discovered resource. - * - * @return the properties value. - */ - DiscoveredResourceProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the inner com.azure.resourcemanager.chaos.fluent.models.DiscoveredResourceInner object. - * - * @return the inner object. - */ - DiscoveredResourceInner innerModel(); -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/DiscoveredResourceProperties.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/DiscoveredResourceProperties.java deleted file mode 100644 index 70f76b1b415e..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/DiscoveredResourceProperties.java +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; - -/** - * Model that represents the properties of a discovered resource. - */ -@Immutable -public final class DiscoveredResourceProperties implements JsonSerializable { - /* - * The namespace of the discovered resource. - */ - private String resourceNamespace; - - /* - * The name of the discovered resource. - */ - private String resourceName; - - /* - * The resource type of the discovered resource. - */ - private String resourceType; - - /* - * The fully qualified identifier of the discovered resource. - */ - private String fullyQualifiedIdentifier; - - /* - * The date and time when the resource was discovered. - */ - private OffsetDateTime discoveredAt; - - /* - * The scope of the discovered resource. - */ - private String scope; - - /** - * Creates an instance of DiscoveredResourceProperties class. - */ - private DiscoveredResourceProperties() { - } - - /** - * Get the resourceNamespace property: The namespace of the discovered resource. - * - * @return the resourceNamespace value. - */ - public String resourceNamespace() { - return this.resourceNamespace; - } - - /** - * Get the resourceName property: The name of the discovered resource. - * - * @return the resourceName value. - */ - public String resourceName() { - return this.resourceName; - } - - /** - * Get the resourceType property: The resource type of the discovered resource. - * - * @return the resourceType value. - */ - public String resourceType() { - return this.resourceType; - } - - /** - * Get the fullyQualifiedIdentifier property: The fully qualified identifier of the discovered resource. - * - * @return the fullyQualifiedIdentifier value. - */ - public String fullyQualifiedIdentifier() { - return this.fullyQualifiedIdentifier; - } - - /** - * Get the discoveredAt property: The date and time when the resource was discovered. - * - * @return the discoveredAt value. - */ - public OffsetDateTime discoveredAt() { - return this.discoveredAt; - } - - /** - * Get the scope property: The scope of the discovered resource. - * - * @return the scope value. - */ - public String scope() { - return this.scope; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DiscoveredResourceProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DiscoveredResourceProperties if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the DiscoveredResourceProperties. - */ - public static DiscoveredResourceProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DiscoveredResourceProperties deserializedDiscoveredResourceProperties = new DiscoveredResourceProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("namespace".equals(fieldName)) { - deserializedDiscoveredResourceProperties.resourceNamespace = reader.getString(); - } else if ("resourceName".equals(fieldName)) { - deserializedDiscoveredResourceProperties.resourceName = reader.getString(); - } else if ("resourceType".equals(fieldName)) { - deserializedDiscoveredResourceProperties.resourceType = reader.getString(); - } else if ("fullyQualifiedIdentifier".equals(fieldName)) { - deserializedDiscoveredResourceProperties.fullyQualifiedIdentifier = reader.getString(); - } else if ("discoveredAt".equals(fieldName)) { - deserializedDiscoveredResourceProperties.discoveredAt = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("scope".equals(fieldName)) { - deserializedDiscoveredResourceProperties.scope = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDiscoveredResourceProperties; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/DiscoveredResources.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/DiscoveredResources.java deleted file mode 100644 index c1d43ad17392..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/DiscoveredResources.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of DiscoveredResources. - */ -public interface DiscoveredResources { - /** - * Get a discovered resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param discoveredResourceName Name of the discovered 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. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a discovered resource along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String workspaceName, - String discoveredResourceName, Context context); - - /** - * Get a discovered resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param discoveredResourceName Name of the discovered resource. - * @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 discovered resource. - */ - DiscoveredResource get(String resourceGroupName, String workspaceName, String discoveredResourceName); - - /** - * Get a list of discovered resources for a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace 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 discovered resources for a workspace as paginated response with {@link PagedIterable}. - */ - PagedIterable listByWorkspace(String resourceGroupName, String workspaceName); - - /** - * Get a list of discovered resources for a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of discovered resources for a workspace as paginated response with {@link PagedIterable}. - */ - PagedIterable listByWorkspace(String resourceGroupName, String workspaceName, Context context); -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/EntraIdentity.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/EntraIdentity.java deleted file mode 100644 index 5d05b5f4d8d1..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/EntraIdentity.java +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Model that represents the Azure Entra identity. - */ -@Immutable -public final class EntraIdentity implements JsonSerializable { - /* - * The identity object id. - */ - private String objectId; - - /* - * The identity tenant id. - */ - private String tenantId; - - /** - * Creates an instance of EntraIdentity class. - */ - private EntraIdentity() { - } - - /** - * Get the objectId property: The identity object id. - * - * @return the objectId value. - */ - public String objectId() { - return this.objectId; - } - - /** - * Get the tenantId property: The identity tenant id. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.tenantId; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EntraIdentity from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EntraIdentity if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the EntraIdentity. - */ - public static EntraIdentity fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EntraIdentity deserializedEntraIdentity = new EntraIdentity(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("objectId".equals(fieldName)) { - deserializedEntraIdentity.objectId = reader.getString(); - } else if ("tenantId".equals(fieldName)) { - deserializedEntraIdentity.tenantId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedEntraIdentity; - }); - } -} 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 bdc22a97ba0e..e31c3a9fea67 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 @@ -85,14 +85,6 @@ public interface Experiment { */ List selectors(); - /** - * Gets the customerDataStorage property: Optional customer-managed Storage account where Experiment schema will be - * stored. - * - * @return the customerDataStorage value. - */ - CustomerDataStorageProperties customerDataStorage(); - /** * Gets the region of the resource. * @@ -203,8 +195,7 @@ interface WithSelectors { * The stage of the Experiment definition which contains all the minimum required properties for the resource to * be created, but also allows for any other optional properties to be specified. */ - interface WithCreate - extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, DefinitionStages.WithCustomerDataStorage { + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity { /** * Executes the create request. * @@ -246,21 +237,6 @@ interface WithIdentity { */ WithCreate withIdentity(ResourceIdentity identity); } - - /** - * The stage of the Experiment definition allowing to specify customerDataStorage. - */ - interface WithCustomerDataStorage { - /** - * Specifies the customerDataStorage property: Optional customer-managed Storage account where Experiment - * schema will be stored.. - * - * @param customerDataStorage Optional customer-managed Storage account where Experiment schema will be - * stored. - * @return the next definition stage. - */ - WithCreate withCustomerDataStorage(CustomerDataStorageProperties customerDataStorage); - } } /** 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 5616234fb92b..fbb6f6e28939 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 @@ -61,13 +61,6 @@ public interface ExperimentExecution { */ OffsetDateTime stoppedAt(); - /** - * Gets the provisioningState property: Resource provisioning state. Not currently in use for executions. - * - * @return the provisioningState value. - */ - ProvisioningState provisioningState(); - /** * Gets the inner com.azure.resourcemanager.chaos.fluent.models.ExperimentExecutionInner object. * 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 2901e6509b05..ea8a8eb9d568 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 @@ -53,13 +53,6 @@ public interface ExperimentExecutionDetails { */ OffsetDateTime stoppedAt(); - /** - * Gets the provisioningState property: Resource provisioning state. Not currently in use for executions. - * - * @return the provisioningState value. - */ - ProvisioningState provisioningState(); - /** * Gets the failureReason property: The reason why the execution failed. * diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ExternalResource.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ExternalResource.java deleted file mode 100644 index 48fda487b40e..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ExternalResource.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Model that represents an external resource reference. - */ -@Fluent -public final class ExternalResource implements JsonSerializable { - /* - * The resource ID of the external resource. - */ - private String resourceId; - - /** - * Creates an instance of ExternalResource class. - */ - public ExternalResource() { - } - - /** - * Get the resourceId property: The resource ID of the external resource. - * - * @return the resourceId value. - */ - public String resourceId() { - return this.resourceId; - } - - /** - * Set the resourceId property: The resource ID of the external resource. - * - * @param resourceId the resourceId value to set. - * @return the ExternalResource object itself. - */ - public ExternalResource withResourceId(String resourceId) { - this.resourceId = resourceId; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("resourceId", this.resourceId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ExternalResource from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ExternalResource if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ExternalResource. - */ - public static ExternalResource fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ExternalResource deserializedExternalResource = new ExternalResource(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("resourceId".equals(fieldName)) { - deserializedExternalResource.resourceId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedExternalResource; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/FixResourcePermissionsRequest.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/FixResourcePermissionsRequest.java deleted file mode 100644 index bf7e5148e084..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/FixResourcePermissionsRequest.java +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Request body for fixing resource permissions. - */ -@Fluent -public final class FixResourcePermissionsRequest implements JsonSerializable { - /* - * Optional value that indicates whether to run a "dry run" of fixing resource permissions. - */ - private Boolean whatIf; - - /** - * Creates an instance of FixResourcePermissionsRequest class. - */ - public FixResourcePermissionsRequest() { - } - - /** - * Get the whatIf property: Optional value that indicates whether to run a "dry run" of fixing resource permissions. - * - * @return the whatIf value. - */ - public Boolean whatIf() { - return this.whatIf; - } - - /** - * Set the whatIf property: Optional value that indicates whether to run a "dry run" of fixing resource permissions. - * - * @param whatIf the whatIf value to set. - * @return the FixResourcePermissionsRequest object itself. - */ - public FixResourcePermissionsRequest withWhatIf(Boolean whatIf) { - this.whatIf = whatIf; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("whatIf", this.whatIf); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FixResourcePermissionsRequest from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FixResourcePermissionsRequest if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the FixResourcePermissionsRequest. - */ - public static FixResourcePermissionsRequest fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FixResourcePermissionsRequest deserializedFixResourcePermissionsRequest - = new FixResourcePermissionsRequest(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("whatIf".equals(fieldName)) { - deserializedFixResourcePermissionsRequest.whatIf = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedFixResourcePermissionsRequest; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/OperationError.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/OperationError.java deleted file mode 100644 index 3977cbae64dd..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/OperationError.java +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Represents a system or infrastructure error encountered during an async operation. - */ -@Immutable -public final class OperationError implements JsonSerializable { - /* - * The error code identifying the type of system error. - */ - private String errorCode; - - /* - * A human-readable description of the system error. - */ - private String errorMessage; - - /** - * Creates an instance of OperationError class. - */ - private OperationError() { - } - - /** - * Get the errorCode property: The error code identifying the type of system error. - * - * @return the errorCode value. - */ - public String errorCode() { - return this.errorCode; - } - - /** - * Get the errorMessage property: A human-readable description of the system error. - * - * @return the errorMessage value. - */ - public String errorMessage() { - return this.errorMessage; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("errorCode", this.errorCode); - jsonWriter.writeStringField("errorMessage", this.errorMessage); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OperationError from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OperationError if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the OperationError. - */ - public static OperationError fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OperationError deserializedOperationError = new OperationError(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("errorCode".equals(fieldName)) { - deserializedOperationError.errorCode = reader.getString(); - } else if ("errorMessage".equals(fieldName)) { - deserializedOperationError.errorMessage = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOperationError; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ParameterType.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ParameterType.java deleted file mode 100644 index 38c2c20d53b5..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ParameterType.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Enum for parameter types. - */ -public final class ParameterType extends ExpandableStringEnum { - /** - * String parameter type. - */ - public static final ParameterType STRING = fromString("string"); - - /** - * Number parameter type. - */ - public static final ParameterType NUMBER = fromString("number"); - - /** - * Boolean parameter type. - */ - public static final ParameterType BOOLEAN = fromString("boolean"); - - /** - * Object parameter type. - */ - public static final ParameterType OBJECT = fromString("object"); - - /** - * Array parameter type. - */ - public static final ParameterType ARRAY = fromString("array"); - - /** - * Creates a new instance of ParameterType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ParameterType() { - } - - /** - * Creates or finds a ParameterType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ParameterType. - */ - public static ParameterType fromString(String name) { - return fromString(name, ParameterType.class); - } - - /** - * Gets known ParameterType values. - * - * @return known ParameterType values. - */ - public static Collection values() { - return values(ParameterType.class); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PermissionError.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PermissionError.java deleted file mode 100644 index 00a489470c3f..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PermissionError.java +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Model that represents the permission error. - */ -@Immutable -public final class PermissionError implements JsonSerializable { - /* - * The resource id for the affected resource. - */ - private String resourceId; - - /* - * The missing permissions. - */ - private List missingPermissions; - - /* - * The required permissions. - */ - private List requiredPermissions; - - /* - * The recommended roles. - */ - private List recommendedRoles; - - /* - * The identity. - */ - private EntraIdentity identity; - - /** - * Creates an instance of PermissionError class. - */ - private PermissionError() { - } - - /** - * Get the resourceId property: The resource id for the affected resource. - * - * @return the resourceId value. - */ - public String resourceId() { - return this.resourceId; - } - - /** - * Get the missingPermissions property: The missing permissions. - * - * @return the missingPermissions value. - */ - public List missingPermissions() { - return this.missingPermissions; - } - - /** - * Get the requiredPermissions property: The required permissions. - * - * @return the requiredPermissions value. - */ - public List requiredPermissions() { - return this.requiredPermissions; - } - - /** - * Get the recommendedRoles property: The recommended roles. - * - * @return the recommendedRoles value. - */ - public List recommendedRoles() { - return this.recommendedRoles; - } - - /** - * Get the identity property: The identity. - * - * @return the identity value. - */ - public EntraIdentity identity() { - return this.identity; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PermissionError from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PermissionError if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the PermissionError. - */ - public static PermissionError fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PermissionError deserializedPermissionError = new PermissionError(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("resourceId".equals(fieldName)) { - deserializedPermissionError.resourceId = reader.getString(); - } else if ("missingPermissions".equals(fieldName)) { - List missingPermissions = reader.readArray(reader1 -> reader1.getString()); - deserializedPermissionError.missingPermissions = missingPermissions; - } else if ("requiredPermissions".equals(fieldName)) { - List requiredPermissions = reader.readArray(reader1 -> reader1.getString()); - deserializedPermissionError.requiredPermissions = requiredPermissions; - } else if ("recommendedRoles".equals(fieldName)) { - List recommendedRoles = reader.readArray(reader1 -> reader1.getString()); - deserializedPermissionError.recommendedRoles = recommendedRoles; - } else if ("identity".equals(fieldName)) { - deserializedPermissionError.identity = EntraIdentity.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedPermissionError; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PermissionsFix.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PermissionsFix.java deleted file mode 100644 index 61fa09be772d..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PermissionsFix.java +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Model that represents the fix resource permissions result. - */ -@Immutable -public final class PermissionsFix extends ProxyResource { - /* - * The resource-specific properties for this resource. - */ - private PermissionsFixProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of PermissionsFix class. - */ - private PermissionsFix() { - } - - /** - * Get the properties property: The resource-specific properties for this resource. - * - * @return the properties value. - */ - public PermissionsFixProperties properties() { - return this.properties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PermissionsFix from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PermissionsFix if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the PermissionsFix. - */ - public static PermissionsFix fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PermissionsFix deserializedPermissionsFix = new PermissionsFix(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedPermissionsFix.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedPermissionsFix.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedPermissionsFix.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedPermissionsFix.properties = PermissionsFixProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedPermissionsFix.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedPermissionsFix; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PermissionsFixProperties.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PermissionsFixProperties.java deleted file mode 100644 index afefb0df0df6..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PermissionsFixProperties.java +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.List; - -/** - * Model that represents the properties of the permission fix operation. - */ -@Immutable -public final class PermissionsFixProperties implements JsonSerializable { - /* - * The permission fix state. - */ - private PermissionsFixState state; - - /* - * The permission fix UTC start time. - */ - private OffsetDateTime startedAt; - - /* - * The permission fix UTC end time. - */ - private OffsetDateTime completedAt; - - /* - * Whether this was a what-if (dry run) operation. - */ - private boolean whatIfMode; - - /* - * The list of role assignment results. - */ - private List roleAssignments; - - /* - * Summary of the permission fix operation. - */ - private PermissionsFixSummary summary; - - /** - * Creates an instance of PermissionsFixProperties class. - */ - private PermissionsFixProperties() { - } - - /** - * Get the state property: The permission fix state. - * - * @return the state value. - */ - public PermissionsFixState state() { - return this.state; - } - - /** - * Get the startedAt property: The permission fix UTC start time. - * - * @return the startedAt value. - */ - public OffsetDateTime startedAt() { - return this.startedAt; - } - - /** - * Get the completedAt property: The permission fix UTC end time. - * - * @return the completedAt value. - */ - public OffsetDateTime completedAt() { - return this.completedAt; - } - - /** - * Get the whatIfMode property: Whether this was a what-if (dry run) operation. - * - * @return the whatIfMode value. - */ - public boolean whatIfMode() { - return this.whatIfMode; - } - - /** - * Get the roleAssignments property: The list of role assignment results. - * - * @return the roleAssignments value. - */ - public List roleAssignments() { - return this.roleAssignments; - } - - /** - * Get the summary property: Summary of the permission fix operation. - * - * @return the summary value. - */ - public PermissionsFixSummary summary() { - return this.summary; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PermissionsFixProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PermissionsFixProperties if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the PermissionsFixProperties. - */ - public static PermissionsFixProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PermissionsFixProperties deserializedPermissionsFixProperties = new PermissionsFixProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("state".equals(fieldName)) { - deserializedPermissionsFixProperties.state = PermissionsFixState.fromString(reader.getString()); - } else if ("startedAt".equals(fieldName)) { - deserializedPermissionsFixProperties.startedAt = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("whatIfMode".equals(fieldName)) { - deserializedPermissionsFixProperties.whatIfMode = reader.getBoolean(); - } else if ("roleAssignments".equals(fieldName)) { - List roleAssignments - = reader.readArray(reader1 -> RoleAssignmentResult.fromJson(reader1)); - deserializedPermissionsFixProperties.roleAssignments = roleAssignments; - } else if ("summary".equals(fieldName)) { - deserializedPermissionsFixProperties.summary = PermissionsFixSummary.fromJson(reader); - } else if ("completedAt".equals(fieldName)) { - deserializedPermissionsFixProperties.completedAt = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else { - reader.skipChildren(); - } - } - - return deserializedPermissionsFixProperties; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PermissionsFixState.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PermissionsFixState.java deleted file mode 100644 index 05af1e99214e..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PermissionsFixState.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Enum of the permission fix state. - */ -public final class PermissionsFixState extends ExpandableStringEnum { - /** - * The permission fix has not started. - */ - public static final PermissionsFixState NOT_STARTED = fromString("NotStarted"); - - /** - * The permission fix is in progress. - */ - public static final PermissionsFixState IN_PROGRESS = fromString("InProgress"); - - /** - * All role assignments succeeded. - */ - public static final PermissionsFixState SUCCEEDED = fromString("Succeeded"); - - /** - * All role assignments failed. - */ - public static final PermissionsFixState FAILED = fromString("Failed"); - - /** - * Some role assignments succeeded and some failed. - */ - public static final PermissionsFixState PARTIALLY_SUCCEEDED = fromString("PartiallySucceeded"); - - /** - * What-if analysis completed (no changes made). - */ - public static final PermissionsFixState WHAT_IF_COMPLETED = fromString("WhatIfCompleted"); - - /** - * Creates a new instance of PermissionsFixState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public PermissionsFixState() { - } - - /** - * Creates or finds a PermissionsFixState from its string representation. - * - * @param name a name to look for. - * @return the corresponding PermissionsFixState. - */ - public static PermissionsFixState fromString(String name) { - return fromString(name, PermissionsFixState.class); - } - - /** - * Gets known PermissionsFixState values. - * - * @return known PermissionsFixState values. - */ - public static Collection values() { - return values(PermissionsFixState.class); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PermissionsFixSummary.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PermissionsFixSummary.java deleted file mode 100644 index c3567fbe9490..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PermissionsFixSummary.java +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Summary of the permission fix operation. - */ -@Immutable -public final class PermissionsFixSummary implements JsonSerializable { - /* - * Total number of role assignments required. - */ - private int totalRequired; - - /* - * Number of successful role assignments. - */ - private int succeeded; - - /* - * Number of failed role assignments. - */ - private int failed; - - /* - * Number of skipped role assignments (already existed). - */ - private int skipped; - - /** - * Creates an instance of PermissionsFixSummary class. - */ - private PermissionsFixSummary() { - } - - /** - * Get the totalRequired property: Total number of role assignments required. - * - * @return the totalRequired value. - */ - public int totalRequired() { - return this.totalRequired; - } - - /** - * Get the succeeded property: Number of successful role assignments. - * - * @return the succeeded value. - */ - public int succeeded() { - return this.succeeded; - } - - /** - * Get the failed property: Number of failed role assignments. - * - * @return the failed value. - */ - public int failed() { - return this.failed; - } - - /** - * Get the skipped property: Number of skipped role assignments (already existed). - * - * @return the skipped value. - */ - public int skipped() { - return this.skipped; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PermissionsFixSummary from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PermissionsFixSummary if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the PermissionsFixSummary. - */ - public static PermissionsFixSummary fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PermissionsFixSummary deserializedPermissionsFixSummary = new PermissionsFixSummary(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("totalRequired".equals(fieldName)) { - deserializedPermissionsFixSummary.totalRequired = reader.getInt(); - } else if ("succeeded".equals(fieldName)) { - deserializedPermissionsFixSummary.succeeded = reader.getInt(); - } else if ("failed".equals(fieldName)) { - deserializedPermissionsFixSummary.failed = reader.getInt(); - } else if ("skipped".equals(fieldName)) { - deserializedPermissionsFixSummary.skipped = reader.getInt(); - } else { - reader.skipChildren(); - } - } - - return deserializedPermissionsFixSummary; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PhysicalToLogicalZoneMapping.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PhysicalToLogicalZoneMapping.java deleted file mode 100644 index f097b31ae1d6..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PhysicalToLogicalZoneMapping.java +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Maps a physical zone to the resolved logical zone for a given subscription. - */ -@Immutable -public final class PhysicalToLogicalZoneMapping implements JsonSerializable { - /* - * The physical availability zone (e.g., `"westus2-az1"`). - */ - private String physicalZone; - - /* - * The logical availability zone resolved for this subscription - * (e.g., `"1"`, `"2"`, `"3"`). - */ - private String logicalZone; - - /** - * Creates an instance of PhysicalToLogicalZoneMapping class. - */ - private PhysicalToLogicalZoneMapping() { - } - - /** - * Get the physicalZone property: The physical availability zone (e.g., `"westus2-az1"`). - * - * @return the physicalZone value. - */ - public String physicalZone() { - return this.physicalZone; - } - - /** - * Get the logicalZone property: The logical availability zone resolved for this subscription - * (e.g., `"1"`, `"2"`, `"3"`). - * - * @return the logicalZone value. - */ - public String logicalZone() { - return this.logicalZone; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PhysicalToLogicalZoneMapping from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PhysicalToLogicalZoneMapping if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the PhysicalToLogicalZoneMapping. - */ - public static PhysicalToLogicalZoneMapping fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PhysicalToLogicalZoneMapping deserializedPhysicalToLogicalZoneMapping = new PhysicalToLogicalZoneMapping(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("physicalZone".equals(fieldName)) { - deserializedPhysicalToLogicalZoneMapping.physicalZone = reader.getString(); - } else if ("logicalZone".equals(fieldName)) { - deserializedPhysicalToLogicalZoneMapping.logicalZone = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedPhysicalToLogicalZoneMapping; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateAccess.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateAccess.java deleted file mode 100644 index 2c5a134340e7..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateAccess.java +++ /dev/null @@ -1,252 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.chaos.fluent.models.PrivateAccessInner; -import java.util.Map; - -/** - * An immutable client-side representation of PrivateAccess. - */ -public interface PrivateAccess { - /** - * 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 properties property: The resource-specific properties for this resource. - * - * @return the properties value. - */ - PrivateAccessProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * 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.PrivateAccessInner object. - * - * @return the inner object. - */ - PrivateAccessInner innerModel(); - - /** - * The entirety of the PrivateAccess definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, DefinitionStages.WithProperties, DefinitionStages.WithCreate { - } - - /** - * The PrivateAccess definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the PrivateAccess definition. - */ - interface Blank extends WithLocation { - } - - /** - * The stage of the PrivateAccess 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. - */ - WithResourceGroup withRegion(Region location); - - /** - * 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 PrivateAccess definition allowing to specify parent resource. - */ - interface WithResourceGroup { - /** - * Specifies resourceGroupName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @return the next definition stage. - */ - WithProperties withExistingResourceGroup(String resourceGroupName); - } - - /** - * The stage of the PrivateAccess definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The resource-specific properties for this resource.. - * - * @param properties The resource-specific properties for this resource. - * @return the next definition stage. - */ - WithCreate withProperties(PrivateAccessProperties properties); - } - - /** - * The stage of the PrivateAccess definition which contains all the minimum required properties for the resource - * to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithTags { - /** - * Executes the create request. - * - * @return the created resource. - */ - PrivateAccess create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - PrivateAccess create(Context context); - } - - /** - * The stage of the PrivateAccess 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); - } - } - - /** - * Begins update for the PrivateAccess resource. - * - * @return the stage of resource update. - */ - PrivateAccess.Update update(); - - /** - * The template for PrivateAccess update. - */ - interface Update extends UpdateStages.WithTags { - /** - * Executes the update request. - * - * @return the updated resource. - */ - PrivateAccess apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - PrivateAccess apply(Context context); - } - - /** - * The PrivateAccess update stages. - */ - interface UpdateStages { - /** - * The stage of the PrivateAccess update allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - PrivateAccess refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - PrivateAccess refresh(Context context); -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateAccessPatch.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateAccessPatch.java deleted file mode 100644 index 5f276ae530ec..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateAccessPatch.java +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Describes a private access update. - */ -@Fluent -public final class PrivateAccessPatch implements JsonSerializable { - /* - * Resource tags. - */ - private Map tags; - - /** - * Creates an instance of PrivateAccessPatch class. - */ - public PrivateAccessPatch() { - } - - /** - * Get the tags property: Resource tags. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Resource tags. - * - * @param tags the tags value to set. - * @return the PrivateAccessPatch object itself. - */ - public PrivateAccessPatch withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PrivateAccessPatch from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateAccessPatch if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the PrivateAccessPatch. - */ - public static PrivateAccessPatch fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateAccessPatch deserializedPrivateAccessPatch = new PrivateAccessPatch(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedPrivateAccessPatch.tags = tags; - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateAccessPatch; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateAccessProperties.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateAccessProperties.java deleted file mode 100644 index 5570e2e36e44..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateAccessProperties.java +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.chaos.fluent.models.PrivateEndpointConnectionInner; -import java.io.IOException; -import java.util.List; - -/** - * The properties of a private access resource. - */ -@Fluent -public final class PrivateAccessProperties implements JsonSerializable { - /* - * Most recent provisioning state for the given privateAccess resource. - */ - private ProvisioningState provisioningState; - - /* - * A readonly collection of private endpoint connection. Currently only one endpoint connection is supported. - */ - private List privateEndpointConnections; - - /* - * Public Network Access Control for PrivateAccess resource. - */ - private PublicNetworkAccessOption publicNetworkAccess; - - /** - * Creates an instance of PrivateAccessProperties class. - */ - public PrivateAccessProperties() { - } - - /** - * Get the provisioningState property: Most recent provisioning state for the given privateAccess resource. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the privateEndpointConnections property: A readonly collection of private endpoint connection. Currently only - * one endpoint connection is supported. - * - * @return the privateEndpointConnections value. - */ - public List privateEndpointConnections() { - return this.privateEndpointConnections; - } - - /** - * Get the publicNetworkAccess property: Public Network Access Control for PrivateAccess resource. - * - * @return the publicNetworkAccess value. - */ - public PublicNetworkAccessOption publicNetworkAccess() { - return this.publicNetworkAccess; - } - - /** - * Set the publicNetworkAccess property: Public Network Access Control for PrivateAccess resource. - * - * @param publicNetworkAccess the publicNetworkAccess value to set. - * @return the PrivateAccessProperties object itself. - */ - public PrivateAccessProperties withPublicNetworkAccess(PublicNetworkAccessOption publicNetworkAccess) { - this.publicNetworkAccess = publicNetworkAccess; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("publicNetworkAccess", - this.publicNetworkAccess == null ? null : this.publicNetworkAccess.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PrivateAccessProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateAccessProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the PrivateAccessProperties. - */ - public static PrivateAccessProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateAccessProperties deserializedPrivateAccessProperties = new PrivateAccessProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("provisioningState".equals(fieldName)) { - deserializedPrivateAccessProperties.provisioningState - = ProvisioningState.fromString(reader.getString()); - } else if ("privateEndpointConnections".equals(fieldName)) { - List privateEndpointConnections - = reader.readArray(reader1 -> PrivateEndpointConnectionInner.fromJson(reader1)); - deserializedPrivateAccessProperties.privateEndpointConnections = privateEndpointConnections; - } else if ("publicNetworkAccess".equals(fieldName)) { - deserializedPrivateAccessProperties.publicNetworkAccess - = PublicNetworkAccessOption.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateAccessProperties; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateAccesses.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateAccesses.java deleted file mode 100644 index 3d8d413ba085..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateAccesses.java +++ /dev/null @@ -1,283 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of PrivateAccesses. - */ -public interface PrivateAccesses { - /** - * Get a private access resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private access resource along with {@link Response}. - */ - Response getByResourceGroupWithResponse(String resourceGroupName, String privateAccessName, - Context context); - - /** - * Get a private access resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @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 private access resource. - */ - PrivateAccess getByResourceGroup(String resourceGroupName, String privateAccessName); - - /** - * Delete a private access. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @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. - */ - void deleteByResourceGroup(String resourceGroupName, String privateAccessName); - - /** - * Delete a private access. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String privateAccessName, Context context); - - /** - * Get a list of private access resources in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private access resources in a resource group as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Get a list of private access resources in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param continuationToken String that sets the continuation token. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private access resources in a resource group as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName, String continuationToken, - Context context); - - /** - * Get a list of private access 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 private access resources in a subscription as paginated response with {@link PagedIterable}. - */ - PagedIterable list(); - - /** - * Get a list of private access resources in a subscription. - * - * @param continuationToken String that sets the continuation token. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private access resources in a subscription as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String continuationToken, Context context); - - /** - * Gets the private link resources possible under private access resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private link resources possible under private access resource along with {@link Response}. - */ - Response getPrivateLinkResourcesWithResponse(String resourceGroupName, - String privateAccessName, Context context); - - /** - * Gets the private link resources possible under private access resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private link resources possible under private access resource. - */ - PrivateLinkResourceListResult getPrivateLinkResources(String resourceGroupName, String privateAccessName); - - /** - * Gets information about a private endpoint connection under a private access resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a private endpoint connection under a private access resource along with - * {@link Response}. - */ - Response getAPrivateEndpointConnectionWithResponse(String resourceGroupName, - String privateAccessName, String privateEndpointConnectionName, Context context); - - /** - * Gets information about a private endpoint connection under a private access resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 information about a private endpoint connection under a private access resource. - */ - PrivateEndpointConnection getAPrivateEndpointConnection(String resourceGroupName, String privateAccessName, - String privateEndpointConnectionName); - - /** - * Deletes a private endpoint connection under a private access resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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. - */ - void deleteAPrivateEndpointConnection(String resourceGroupName, String privateAccessName, - String privateEndpointConnectionName); - - /** - * Deletes a private endpoint connection under a private access resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteAPrivateEndpointConnection(String resourceGroupName, String privateAccessName, - String privateEndpointConnectionName, Context context); - - /** - * List information about private endpoint connections under a private access resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @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 private link resources as paginated response with {@link PagedIterable}. - */ - PagedIterable listPrivateEndpointConnections(String resourceGroupName, - String privateAccessName); - - /** - * List information about private endpoint connections under a private access resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateAccessName The name of the private access resource that is being created. Supported characters for - * the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private link resources as paginated response with {@link PagedIterable}. - */ - PagedIterable listPrivateEndpointConnections(String resourceGroupName, - String privateAccessName, Context context); - - /** - * Get a private access 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. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private access resource along with {@link Response}. - */ - PrivateAccess getById(String id); - - /** - * Get a private access resource. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private access resource along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a private access. - * - * @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. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete a private access. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new PrivateAccess resource. - * - * @param name resource name. - * @return the first stage of the new PrivateAccess definition. - */ - PrivateAccess.DefinitionStages.Blank define(String name); -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateEndpoint.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateEndpoint.java deleted file mode 100644 index 2064113b8217..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateEndpoint.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The private endpoint resource. - */ -@Immutable -public final class PrivateEndpoint implements JsonSerializable { - /* - * The Azure identifier for private endpoint. - */ - private String id; - - /** - * Creates an instance of PrivateEndpoint class. - */ - private PrivateEndpoint() { - } - - /** - * Get the id property: The Azure identifier for private endpoint. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PrivateEndpoint from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateEndpoint if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the PrivateEndpoint. - */ - public static PrivateEndpoint fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateEndpoint deserializedPrivateEndpoint = new PrivateEndpoint(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedPrivateEndpoint.id = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateEndpoint; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateEndpointConnection.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateEndpointConnection.java deleted file mode 100644 index 57f12642dd3b..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateEndpointConnection.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.chaos.fluent.models.PrivateEndpointConnectionInner; - -/** - * An immutable client-side representation of PrivateEndpointConnection. - */ -public interface PrivateEndpointConnection { - /** - * 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 properties property: Resource properties. - * - * @return the properties value. - */ - PrivateEndpointConnectionProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the inner com.azure.resourcemanager.chaos.fluent.models.PrivateEndpointConnectionInner object. - * - * @return the inner object. - */ - PrivateEndpointConnectionInner innerModel(); -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateEndpointConnectionProperties.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateEndpointConnectionProperties.java deleted file mode 100644 index 483b2851f36e..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateEndpointConnectionProperties.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Properties of the private endpoint connection. - */ -@Immutable -public final class PrivateEndpointConnectionProperties - implements JsonSerializable { - /* - * The group ids for the private endpoint resource. - */ - private List groupIds; - - /* - * The private endpoint resource. - */ - private PrivateEndpoint privateEndpoint; - - /* - * A collection of information about the state of the connection between service consumer and provider. - */ - private PrivateLinkServiceConnectionState privateLinkServiceConnectionState; - - /* - * The provisioning state of the private endpoint connection resource. - */ - private ProvisioningState provisioningState; - - /** - * Creates an instance of PrivateEndpointConnectionProperties class. - */ - private PrivateEndpointConnectionProperties() { - } - - /** - * Get the groupIds property: The group ids for the private endpoint resource. - * - * @return the groupIds value. - */ - public List groupIds() { - return this.groupIds; - } - - /** - * Get the privateEndpoint property: The private endpoint resource. - * - * @return the privateEndpoint value. - */ - public PrivateEndpoint privateEndpoint() { - return this.privateEndpoint; - } - - /** - * Get the privateLinkServiceConnectionState property: A collection of information about the state of the connection - * between service consumer and provider. - * - * @return the privateLinkServiceConnectionState value. - */ - public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { - return this.privateLinkServiceConnectionState; - } - - /** - * Get the provisioningState property: The provisioning state of the private endpoint connection resource. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("privateLinkServiceConnectionState", this.privateLinkServiceConnectionState); - jsonWriter.writeJsonField("privateEndpoint", this.privateEndpoint); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PrivateEndpointConnectionProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateEndpointConnectionProperties if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the PrivateEndpointConnectionProperties. - */ - public static PrivateEndpointConnectionProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateEndpointConnectionProperties deserializedPrivateEndpointConnectionProperties - = new PrivateEndpointConnectionProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("privateLinkServiceConnectionState".equals(fieldName)) { - deserializedPrivateEndpointConnectionProperties.privateLinkServiceConnectionState - = PrivateLinkServiceConnectionState.fromJson(reader); - } else if ("groupIds".equals(fieldName)) { - List groupIds = reader.readArray(reader1 -> reader1.getString()); - deserializedPrivateEndpointConnectionProperties.groupIds = groupIds; - } else if ("privateEndpoint".equals(fieldName)) { - deserializedPrivateEndpointConnectionProperties.privateEndpoint = PrivateEndpoint.fromJson(reader); - } else if ("provisioningState".equals(fieldName)) { - deserializedPrivateEndpointConnectionProperties.provisioningState - = ProvisioningState.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateEndpointConnectionProperties; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateEndpointServiceConnectionStatus.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateEndpointServiceConnectionStatus.java deleted file mode 100644 index 83020d5017f2..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateEndpointServiceConnectionStatus.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The private endpoint connection status. - */ -public final class PrivateEndpointServiceConnectionStatus - extends ExpandableStringEnum { - /** - * Pending status. - */ - public static final PrivateEndpointServiceConnectionStatus PENDING = fromString("Pending"); - - /** - * Approved status. - */ - public static final PrivateEndpointServiceConnectionStatus APPROVED = fromString("Approved"); - - /** - * Rejected status. - */ - public static final PrivateEndpointServiceConnectionStatus REJECTED = fromString("Rejected"); - - /** - * Creates a new instance of PrivateEndpointServiceConnectionStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public PrivateEndpointServiceConnectionStatus() { - } - - /** - * Creates or finds a PrivateEndpointServiceConnectionStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding PrivateEndpointServiceConnectionStatus. - */ - public static PrivateEndpointServiceConnectionStatus fromString(String name) { - return fromString(name, PrivateEndpointServiceConnectionStatus.class); - } - - /** - * Gets known PrivateEndpointServiceConnectionStatus values. - * - * @return known PrivateEndpointServiceConnectionStatus values. - */ - public static Collection values() { - return values(PrivateEndpointServiceConnectionStatus.class); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateLinkResource.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateLinkResource.java deleted file mode 100644 index c8565fcac0f2..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateLinkResource.java +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.management.Resource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * A private link resource. - */ -@Immutable -public final class PrivateLinkResource extends Resource { - /* - * The resource-specific properties for this resource. - */ - private PrivateLinkResourceProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of PrivateLinkResource class. - */ - private PrivateLinkResource() { - } - - /** - * Get the properties property: The resource-specific properties for this resource. - * - * @return the properties value. - */ - public PrivateLinkResourceProperties properties() { - return this.properties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", location()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PrivateLinkResource from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateLinkResource if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the PrivateLinkResource. - */ - public static PrivateLinkResource fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateLinkResource deserializedPrivateLinkResource = new PrivateLinkResource(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedPrivateLinkResource.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedPrivateLinkResource.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedPrivateLinkResource.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedPrivateLinkResource.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedPrivateLinkResource.withTags(tags); - } else if ("properties".equals(fieldName)) { - deserializedPrivateLinkResource.properties = PrivateLinkResourceProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedPrivateLinkResource.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateLinkResource; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateLinkResourceListResult.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateLinkResourceListResult.java deleted file mode 100644 index 68322a0971e4..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateLinkResourceListResult.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.resourcemanager.chaos.fluent.models.PrivateLinkResourceListResultInner; -import java.util.List; - -/** - * An immutable client-side representation of PrivateLinkResourceListResult. - */ -public interface PrivateLinkResourceListResult { - /** - * Gets the value property: The PrivateLinkResource items on this page. - * - * @return the value value. - */ - List value(); - - /** - * Gets the nextLink property: The link to the next page of items. - * - * @return the nextLink value. - */ - String nextLink(); - - /** - * Gets the inner com.azure.resourcemanager.chaos.fluent.models.PrivateLinkResourceListResultInner object. - * - * @return the inner object. - */ - PrivateLinkResourceListResultInner innerModel(); -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateLinkResourceProperties.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateLinkResourceProperties.java deleted file mode 100644 index dae75594a1b8..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateLinkResourceProperties.java +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Properties of a private link resource. - */ -@Immutable -public final class PrivateLinkResourceProperties implements JsonSerializable { - /* - * The private link resource group id. - */ - private String groupId; - - /* - * The private link resource required member names. - */ - private List requiredMembers; - - /* - * The private link resource private link DNS zone name. - */ - private List requiredZoneNames; - - /* - * Resource provisioning state. Not currently in use. - */ - private ProvisioningState provisioningState; - - /** - * Creates an instance of PrivateLinkResourceProperties class. - */ - private PrivateLinkResourceProperties() { - } - - /** - * Get the groupId property: The private link resource group id. - * - * @return the groupId value. - */ - public String groupId() { - return this.groupId; - } - - /** - * Get the requiredMembers property: The private link resource required member names. - * - * @return the requiredMembers value. - */ - public List requiredMembers() { - return this.requiredMembers; - } - - /** - * Get the requiredZoneNames property: The private link resource private link DNS zone name. - * - * @return the requiredZoneNames value. - */ - public List requiredZoneNames() { - return this.requiredZoneNames; - } - - /** - * Get the provisioningState property: Resource provisioning state. Not currently in use. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("requiredZoneNames", this.requiredZoneNames, - (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PrivateLinkResourceProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateLinkResourceProperties if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the PrivateLinkResourceProperties. - */ - public static PrivateLinkResourceProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateLinkResourceProperties deserializedPrivateLinkResourceProperties - = new PrivateLinkResourceProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("groupId".equals(fieldName)) { - deserializedPrivateLinkResourceProperties.groupId = reader.getString(); - } else if ("requiredMembers".equals(fieldName)) { - List requiredMembers = reader.readArray(reader1 -> reader1.getString()); - deserializedPrivateLinkResourceProperties.requiredMembers = requiredMembers; - } else if ("requiredZoneNames".equals(fieldName)) { - List requiredZoneNames = reader.readArray(reader1 -> reader1.getString()); - deserializedPrivateLinkResourceProperties.requiredZoneNames = requiredZoneNames; - } else if ("provisioningState".equals(fieldName)) { - deserializedPrivateLinkResourceProperties.provisioningState - = ProvisioningState.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateLinkResourceProperties; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateLinkServiceConnectionState.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateLinkServiceConnectionState.java deleted file mode 100644 index 8e468a62c3f3..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/PrivateLinkServiceConnectionState.java +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * A collection of information about the state of the connection between service consumer and provider. - */ -@Immutable -public final class PrivateLinkServiceConnectionState implements JsonSerializable { - /* - * Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. - */ - private PrivateEndpointServiceConnectionStatus status; - - /* - * The reason for approval/rejection of the connection. - */ - private String description; - - /* - * A message indicating if changes on the service provider require any updates on the consumer. - */ - private String actionsRequired; - - /** - * Creates an instance of PrivateLinkServiceConnectionState class. - */ - private PrivateLinkServiceConnectionState() { - } - - /** - * Get the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the - * service. - * - * @return the status value. - */ - public PrivateEndpointServiceConnectionStatus status() { - return this.status; - } - - /** - * Get the description property: The reason for approval/rejection of the connection. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Get the actionsRequired property: A message indicating if changes on the service provider require any updates on - * the consumer. - * - * @return the actionsRequired value. - */ - public String actionsRequired() { - return this.actionsRequired; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); - jsonWriter.writeStringField("description", this.description); - jsonWriter.writeStringField("actionsRequired", this.actionsRequired); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PrivateLinkServiceConnectionState from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateLinkServiceConnectionState if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the PrivateLinkServiceConnectionState. - */ - public static PrivateLinkServiceConnectionState fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateLinkServiceConnectionState deserializedPrivateLinkServiceConnectionState - = new PrivateLinkServiceConnectionState(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("status".equals(fieldName)) { - deserializedPrivateLinkServiceConnectionState.status - = PrivateEndpointServiceConnectionStatus.fromString(reader.getString()); - } else if ("description".equals(fieldName)) { - deserializedPrivateLinkServiceConnectionState.description = reader.getString(); - } else if ("actionsRequired".equals(fieldName)) { - deserializedPrivateLinkServiceConnectionState.actionsRequired = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateLinkServiceConnectionState; - }); - } -} 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 0017f1b012e0..099f09cdad9a 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 @@ -41,11 +41,6 @@ public final class ProvisioningState extends ExpandableStringEnum { - /** - * Enabled access. - */ - public static final PublicNetworkAccessOption ENABLED = fromString("Enabled"); - - /** - * Disabled access. - */ - public static final PublicNetworkAccessOption DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of PublicNetworkAccessOption value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public PublicNetworkAccessOption() { - } - - /** - * Creates or finds a PublicNetworkAccessOption from its string representation. - * - * @param name a name to look for. - * @return the corresponding PublicNetworkAccessOption. - */ - public static PublicNetworkAccessOption fromString(String name) { - return fromString(name, PublicNetworkAccessOption.class); - } - - /** - * Gets known PublicNetworkAccessOption values. - * - * @return known PublicNetworkAccessOption values. - */ - public static Collection values() { - return values(PublicNetworkAccessOption.class); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Recommendation.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Recommendation.java deleted file mode 100644 index 467b4efc6b1e..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Recommendation.java +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; - -/** - * Model that represents a scenario recommendation. - */ -@Immutable -public final class Recommendation implements JsonSerializable { - /* - * The recommendation status. - */ - private RecommendationStatus recommendationStatus; - - /* - * The UTC time when the recommendation was evaluated. - */ - private OffsetDateTime evaluationRunAt; - - /** - * Creates an instance of Recommendation class. - */ - private Recommendation() { - } - - /** - * Get the recommendationStatus property: The recommendation status. - * - * @return the recommendationStatus value. - */ - public RecommendationStatus recommendationStatus() { - return this.recommendationStatus; - } - - /** - * Get the evaluationRunAt property: The UTC time when the recommendation was evaluated. - * - * @return the evaluationRunAt value. - */ - public OffsetDateTime evaluationRunAt() { - return this.evaluationRunAt; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Recommendation from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Recommendation if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the Recommendation. - */ - public static Recommendation fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Recommendation deserializedRecommendation = new Recommendation(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("recommendationStatus".equals(fieldName)) { - deserializedRecommendation.recommendationStatus - = RecommendationStatus.fromString(reader.getString()); - } else if ("evaluationRunAt".equals(fieldName)) { - deserializedRecommendation.evaluationRunAt = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else { - reader.skipChildren(); - } - } - - return deserializedRecommendation; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/RecommendationStatus.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/RecommendationStatus.java deleted file mode 100644 index d33e6603b653..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/RecommendationStatus.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Enum of the scenario validation state. - */ -public final class RecommendationStatus extends ExpandableStringEnum { - /** - * The scenario recommendation status has not been evaluated. - */ - public static final RecommendationStatus NOT_EVALUATED = fromString("NotEvaluated"); - - /** - * The scenario recommendation status is recommended. - */ - public static final RecommendationStatus RECOMMENDED = fromString("Recommended"); - - /** - * The scenario recommendation status is not applicable. - */ - public static final RecommendationStatus NOT_APPLICABLE = fromString("NotApplicable"); - - /** - * The scenario recommendation status is currently being evaluated. - */ - public static final RecommendationStatus EVALUATING = fromString("Evaluating"); - - /** - * The scenario recommendation evaluation has failed. - */ - public static final RecommendationStatus EVALUATION_FAILED = fromString("EvaluationFailed"); - - /** - * The scenario recommendation evaluation was cancelled. - */ - public static final RecommendationStatus EVALUATION_CANCELLED = fromString("EvaluationCancelled"); - - /** - * Creates a new instance of RecommendationStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public RecommendationStatus() { - } - - /** - * Creates or finds a RecommendationStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding RecommendationStatus. - */ - public static RecommendationStatus fromString(String name) { - return fromString(name, RecommendationStatus.class); - } - - /** - * Gets known RecommendationStatus values. - * - * @return known RecommendationStatus values. - */ - public static Collection values() { - return values(RecommendationStatus.class); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ResourceStateError.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ResourceStateError.java deleted file mode 100644 index 8be4c89afad0..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ResourceStateError.java +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Model that represents the resource state error. - */ -@Immutable -public final class ResourceStateError implements JsonSerializable { - /* - * The resource id for the affected resource. - */ - private String resourceId; - - /* - * The error code. - */ - private int errorCode; - - /* - * The error message. - */ - private String errorMessage; - - /* - * The remediation uri. - */ - private String remediationUri; - - /** - * Creates an instance of ResourceStateError class. - */ - private ResourceStateError() { - } - - /** - * Get the resourceId property: The resource id for the affected resource. - * - * @return the resourceId value. - */ - public String resourceId() { - return this.resourceId; - } - - /** - * Get the errorCode property: The error code. - * - * @return the errorCode value. - */ - public int errorCode() { - return this.errorCode; - } - - /** - * Get the errorMessage property: The error message. - * - * @return the errorMessage value. - */ - public String errorMessage() { - return this.errorMessage; - } - - /** - * Get the remediationUri property: The remediation uri. - * - * @return the remediationUri value. - */ - public String remediationUri() { - return this.remediationUri; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ResourceStateError from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ResourceStateError if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ResourceStateError. - */ - public static ResourceStateError fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ResourceStateError deserializedResourceStateError = new ResourceStateError(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("resourceId".equals(fieldName)) { - deserializedResourceStateError.resourceId = reader.getString(); - } else if ("errorCode".equals(fieldName)) { - deserializedResourceStateError.errorCode = reader.getInt(); - } else if ("errorMessage".equals(fieldName)) { - deserializedResourceStateError.errorMessage = reader.getString(); - } else if ("remediationUri".equals(fieldName)) { - deserializedResourceStateError.remediationUri = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedResourceStateError; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/RoleAssignmentError.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/RoleAssignmentError.java deleted file mode 100644 index afc1ab9986b8..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/RoleAssignmentError.java +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Error details for a failed role assignment. - */ -@Immutable -public final class RoleAssignmentError implements JsonSerializable { - /* - * Azure error code. - */ - private String code; - - /* - * Error message. - */ - private String message; - - /** - * Creates an instance of RoleAssignmentError class. - */ - private RoleAssignmentError() { - } - - /** - * Get the code property: Azure error code. - * - * @return the code value. - */ - public String code() { - return this.code; - } - - /** - * Get the message property: Error message. - * - * @return the message value. - */ - public String message() { - return this.message; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RoleAssignmentError from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RoleAssignmentError if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RoleAssignmentError. - */ - public static RoleAssignmentError fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RoleAssignmentError deserializedRoleAssignmentError = new RoleAssignmentError(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("code".equals(fieldName)) { - deserializedRoleAssignmentError.code = reader.getString(); - } else if ("message".equals(fieldName)) { - deserializedRoleAssignmentError.message = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedRoleAssignmentError; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/RoleAssignmentResult.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/RoleAssignmentResult.java deleted file mode 100644 index 89d08485d3cb..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/RoleAssignmentResult.java +++ /dev/null @@ -1,186 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Result of a single role assignment operation. - */ -@Immutable -public final class RoleAssignmentResult implements JsonSerializable { - /* - * The target Azure resource ID. - */ - private String targetResourceId; - - /* - * The managed identity principal ID. - */ - private String principalId; - - /* - * The Azure RBAC role definition ID. - */ - private String roleDefinitionId; - - /* - * Human-readable role name. - */ - private String roleDefinitionName; - - /* - * The scope at which the role was/will be assigned. - */ - private String scope; - - /* - * The status of the role assignment operation. - */ - private RoleAssignmentStatus status; - - /* - * The created role assignment resource ID (null if failed or what-if mode). - */ - private String roleAssignmentId; - - /* - * Error details if the assignment failed. - */ - private RoleAssignmentError error; - - /** - * Creates an instance of RoleAssignmentResult class. - */ - private RoleAssignmentResult() { - } - - /** - * Get the targetResourceId property: The target Azure resource ID. - * - * @return the targetResourceId value. - */ - public String targetResourceId() { - return this.targetResourceId; - } - - /** - * Get the principalId property: The managed identity principal ID. - * - * @return the principalId value. - */ - public String principalId() { - return this.principalId; - } - - /** - * Get the roleDefinitionId property: The Azure RBAC role definition ID. - * - * @return the roleDefinitionId value. - */ - public String roleDefinitionId() { - return this.roleDefinitionId; - } - - /** - * Get the roleDefinitionName property: Human-readable role name. - * - * @return the roleDefinitionName value. - */ - public String roleDefinitionName() { - return this.roleDefinitionName; - } - - /** - * Get the scope property: The scope at which the role was/will be assigned. - * - * @return the scope value. - */ - public String scope() { - return this.scope; - } - - /** - * Get the status property: The status of the role assignment operation. - * - * @return the status value. - */ - public RoleAssignmentStatus status() { - return this.status; - } - - /** - * Get the roleAssignmentId property: The created role assignment resource ID (null if failed or what-if mode). - * - * @return the roleAssignmentId value. - */ - public String roleAssignmentId() { - return this.roleAssignmentId; - } - - /** - * Get the error property: Error details if the assignment failed. - * - * @return the error value. - */ - public RoleAssignmentError error() { - return this.error; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RoleAssignmentResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RoleAssignmentResult if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RoleAssignmentResult. - */ - public static RoleAssignmentResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RoleAssignmentResult deserializedRoleAssignmentResult = new RoleAssignmentResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("targetResourceId".equals(fieldName)) { - deserializedRoleAssignmentResult.targetResourceId = reader.getString(); - } else if ("principalId".equals(fieldName)) { - deserializedRoleAssignmentResult.principalId = reader.getString(); - } else if ("roleDefinitionId".equals(fieldName)) { - deserializedRoleAssignmentResult.roleDefinitionId = reader.getString(); - } else if ("roleDefinitionName".equals(fieldName)) { - deserializedRoleAssignmentResult.roleDefinitionName = reader.getString(); - } else if ("scope".equals(fieldName)) { - deserializedRoleAssignmentResult.scope = reader.getString(); - } else if ("status".equals(fieldName)) { - deserializedRoleAssignmentResult.status = RoleAssignmentStatus.fromString(reader.getString()); - } else if ("roleAssignmentId".equals(fieldName)) { - deserializedRoleAssignmentResult.roleAssignmentId = reader.getString(); - } else if ("error".equals(fieldName)) { - deserializedRoleAssignmentResult.error = RoleAssignmentError.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedRoleAssignmentResult; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/RoleAssignmentStatus.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/RoleAssignmentStatus.java deleted file mode 100644 index 52365443d7e7..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/RoleAssignmentStatus.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Enum of the role assignment status. - */ -public final class RoleAssignmentStatus extends ExpandableStringEnum { - /** - * The role assignment succeeded. - */ - public static final RoleAssignmentStatus SUCCEEDED = fromString("Succeeded"); - - /** - * The role assignment failed. - */ - public static final RoleAssignmentStatus FAILED = fromString("Failed"); - - /** - * The role assignment was skipped (already exists). - */ - public static final RoleAssignmentStatus SKIPPED = fromString("Skipped"); - - /** - * The role assignment is pending (what-if mode). - */ - public static final RoleAssignmentStatus PENDING = fromString("Pending"); - - /** - * Creates a new instance of RoleAssignmentStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public RoleAssignmentStatus() { - } - - /** - * Creates or finds a RoleAssignmentStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding RoleAssignmentStatus. - */ - public static RoleAssignmentStatus fromString(String name) { - return fromString(name, RoleAssignmentStatus.class); - } - - /** - * Gets known RoleAssignmentStatus values. - * - * @return known RoleAssignmentStatus values. - */ - public static Collection values() { - return values(RoleAssignmentStatus.class); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/RunAfter.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/RunAfter.java deleted file mode 100644 index 72f548664ad9..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/RunAfter.java +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Model that represents action dependencies. - */ -@Fluent -public final class RunAfter implements JsonSerializable { - /* - * Defines how multiple dependencies are evaluated. - */ - private RunAfterBehavior behavior; - - /* - * Array of action dependencies. - */ - private List items; - - /** - * Creates an instance of RunAfter class. - */ - public RunAfter() { - } - - /** - * Get the behavior property: Defines how multiple dependencies are evaluated. - * - * @return the behavior value. - */ - public RunAfterBehavior behavior() { - return this.behavior; - } - - /** - * Set the behavior property: Defines how multiple dependencies are evaluated. - * - * @param behavior the behavior value to set. - * @return the RunAfter object itself. - */ - public RunAfter withBehavior(RunAfterBehavior behavior) { - this.behavior = behavior; - return this; - } - - /** - * Get the items property: Array of action dependencies. - * - * @return the items value. - */ - public List items() { - return this.items; - } - - /** - * Set the items property: Array of action dependencies. - * - * @param items the items value to set. - * @return the RunAfter object itself. - */ - public RunAfter withItems(List items) { - this.items = items; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("items", this.items, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("behavior", this.behavior == null ? null : this.behavior.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RunAfter from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RunAfter if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RunAfter. - */ - public static RunAfter fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RunAfter deserializedRunAfter = new RunAfter(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("items".equals(fieldName)) { - List items = reader.readArray(reader1 -> ActionDependency.fromJson(reader1)); - deserializedRunAfter.items = items; - } else if ("behavior".equals(fieldName)) { - deserializedRunAfter.behavior = RunAfterBehavior.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedRunAfter; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/RunAfterBehavior.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/RunAfterBehavior.java deleted file mode 100644 index 2d961ad6aa90..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/RunAfterBehavior.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Enum for run after behavior. - */ -public final class RunAfterBehavior extends ExpandableStringEnum { - /** - * Always continues after all dependencies (like a finally block). - */ - public static final RunAfterBehavior ANY = fromString("Any"); - - /** - * All dependencies must be satisfied to continue. - */ - public static final RunAfterBehavior ALL = fromString("All"); - - /** - * At least one dependency must be satisfied to continue. - */ - public static final RunAfterBehavior AT_LEAST_ONE = fromString("AtLeastOne"); - - /** - * Creates a new instance of RunAfterBehavior value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public RunAfterBehavior() { - } - - /** - * Creates or finds a RunAfterBehavior from its string representation. - * - * @param name a name to look for. - * @return the corresponding RunAfterBehavior. - */ - public static RunAfterBehavior fromString(String name) { - return fromString(name, RunAfterBehavior.class); - } - - /** - * Gets known RunAfterBehavior values. - * - * @return known RunAfterBehavior values. - */ - public static Collection values() { - return values(RunAfterBehavior.class); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Scenario.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Scenario.java deleted file mode 100644 index 64957088f160..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Scenario.java +++ /dev/null @@ -1,189 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.chaos.fluent.models.ScenarioInner; - -/** - * An immutable client-side representation of Scenario. - */ -public interface Scenario { - /** - * 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 properties property: The properties of scenario. - * - * @return the properties value. - */ - ScenarioProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * 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.ScenarioInner object. - * - * @return the inner object. - */ - ScenarioInner innerModel(); - - /** - * The entirety of the Scenario definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The Scenario definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the Scenario definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the Scenario definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @return the next definition stage. - */ - WithCreate withExistingWorkspace(String resourceGroupName, String workspaceName); - } - - /** - * The stage of the Scenario definition which contains all the minimum required properties for the resource to - * be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithProperties { - /** - * Executes the create request. - * - * @return the created resource. - */ - Scenario create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - Scenario create(Context context); - } - - /** - * The stage of the Scenario definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The properties of scenario.. - * - * @param properties The properties of scenario. - * @return the next definition stage. - */ - WithCreate withProperties(ScenarioProperties properties); - } - } - - /** - * Begins update for the Scenario resource. - * - * @return the stage of resource update. - */ - Scenario.Update update(); - - /** - * The template for Scenario update. - */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - Scenario apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - Scenario apply(Context context); - } - - /** - * The Scenario update stages. - */ - interface UpdateStages { - /** - * The stage of the Scenario update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The properties of scenario.. - * - * @param properties The properties of scenario. - * @return the next definition stage. - */ - Update withProperties(ScenarioProperties properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - Scenario refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - Scenario refresh(Context context); -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioAction.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioAction.java deleted file mode 100644 index 376512215eb6..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioAction.java +++ /dev/null @@ -1,317 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Model that represents a scenario action. - */ -@Fluent -public final class ScenarioAction implements JsonSerializable { - /* - * Unique name for the action. - */ - private String name; - - /* - * Identifier of the action and version (e.g., "microsoft-compute-shutdown/1.0"). - */ - private String actionId; - - /* - * Human-readable description of what this action does. - */ - private String description; - - /* - * ISO 8601 duration for how long the action runs (e.g., PT30M for 30 minutes). Supports template macro syntax - * (%%\{parameters.\\}%%). - */ - private String duration; - - /* - * Action-specific parameter values. - */ - private List parameters; - - /* - * Action dependencies that control when this action starts. - */ - private RunAfter runAfter; - - /* - * ISO 8601 duration to wait before action starts (e.g., PT30S for 30 seconds). Supports template macro syntax. - */ - private String waitBefore; - - /* - * ISO 8601 duration for maximum action execution time. Supports template macro syntax. - */ - private String timeout; - - /* - * External resource reference for the action. - */ - private ExternalResource externalResource; - - /** - * Creates an instance of ScenarioAction class. - */ - public ScenarioAction() { - } - - /** - * Get the name property: Unique name for the action. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Unique name for the action. - * - * @param name the name value to set. - * @return the ScenarioAction object itself. - */ - public ScenarioAction withName(String name) { - this.name = name; - return this; - } - - /** - * Get the actionId property: Identifier of the action and version (e.g., "microsoft-compute-shutdown/1.0"). - * - * @return the actionId value. - */ - public String actionId() { - return this.actionId; - } - - /** - * Set the actionId property: Identifier of the action and version (e.g., "microsoft-compute-shutdown/1.0"). - * - * @param actionId the actionId value to set. - * @return the ScenarioAction object itself. - */ - public ScenarioAction withActionId(String actionId) { - this.actionId = actionId; - return this; - } - - /** - * Get the description property: Human-readable description of what this action does. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: Human-readable description of what this action does. - * - * @param description the description value to set. - * @return the ScenarioAction object itself. - */ - public ScenarioAction withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the duration property: ISO 8601 duration for how long the action runs (e.g., PT30M for 30 minutes). Supports - * template macro syntax (%%\{parameters.\<name\>\}%%). - * - * @return the duration value. - */ - public String duration() { - return this.duration; - } - - /** - * Set the duration property: ISO 8601 duration for how long the action runs (e.g., PT30M for 30 minutes). Supports - * template macro syntax (%%\{parameters.\<name\>\}%%). - * - * @param duration the duration value to set. - * @return the ScenarioAction object itself. - */ - public ScenarioAction withDuration(String duration) { - this.duration = duration; - return this; - } - - /** - * Get the parameters property: Action-specific parameter values. - * - * @return the parameters value. - */ - public List parameters() { - return this.parameters; - } - - /** - * Set the parameters property: Action-specific parameter values. - * - * @param parameters the parameters value to set. - * @return the ScenarioAction object itself. - */ - public ScenarioAction withParameters(List parameters) { - this.parameters = parameters; - return this; - } - - /** - * Get the runAfter property: Action dependencies that control when this action starts. - * - * @return the runAfter value. - */ - public RunAfter runAfter() { - return this.runAfter; - } - - /** - * Set the runAfter property: Action dependencies that control when this action starts. - * - * @param runAfter the runAfter value to set. - * @return the ScenarioAction object itself. - */ - public ScenarioAction withRunAfter(RunAfter runAfter) { - this.runAfter = runAfter; - return this; - } - - /** - * Get the waitBefore property: ISO 8601 duration to wait before action starts (e.g., PT30S for 30 seconds). - * Supports template macro syntax. - * - * @return the waitBefore value. - */ - public String waitBefore() { - return this.waitBefore; - } - - /** - * Set the waitBefore property: ISO 8601 duration to wait before action starts (e.g., PT30S for 30 seconds). - * Supports template macro syntax. - * - * @param waitBefore the waitBefore value to set. - * @return the ScenarioAction object itself. - */ - public ScenarioAction withWaitBefore(String waitBefore) { - this.waitBefore = waitBefore; - return this; - } - - /** - * Get the timeout property: ISO 8601 duration for maximum action execution time. Supports template macro syntax. - * - * @return the timeout value. - */ - public String timeout() { - return this.timeout; - } - - /** - * Set the timeout property: ISO 8601 duration for maximum action execution time. Supports template macro syntax. - * - * @param timeout the timeout value to set. - * @return the ScenarioAction object itself. - */ - public ScenarioAction withTimeout(String timeout) { - this.timeout = timeout; - return this; - } - - /** - * Get the externalResource property: External resource reference for the action. - * - * @return the externalResource value. - */ - public ExternalResource externalResource() { - return this.externalResource; - } - - /** - * Set the externalResource property: External resource reference for the action. - * - * @param externalResource the externalResource value to set. - * @return the ScenarioAction object itself. - */ - public ScenarioAction withExternalResource(ExternalResource externalResource) { - this.externalResource = externalResource; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("actionId", this.actionId); - jsonWriter.writeStringField("duration", this.duration); - jsonWriter.writeStringField("description", this.description); - jsonWriter.writeArrayField("parameters", this.parameters, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("runAfter", this.runAfter); - jsonWriter.writeStringField("waitBefore", this.waitBefore); - jsonWriter.writeStringField("timeout", this.timeout); - jsonWriter.writeJsonField("externalResource", this.externalResource); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ScenarioAction from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ScenarioAction if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ScenarioAction. - */ - public static ScenarioAction fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ScenarioAction deserializedScenarioAction = new ScenarioAction(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedScenarioAction.name = reader.getString(); - } else if ("actionId".equals(fieldName)) { - deserializedScenarioAction.actionId = reader.getString(); - } else if ("duration".equals(fieldName)) { - deserializedScenarioAction.duration = reader.getString(); - } else if ("description".equals(fieldName)) { - deserializedScenarioAction.description = reader.getString(); - } else if ("parameters".equals(fieldName)) { - List parameters = reader.readArray(reader1 -> KeyValuePair.fromJson(reader1)); - deserializedScenarioAction.parameters = parameters; - } else if ("runAfter".equals(fieldName)) { - deserializedScenarioAction.runAfter = RunAfter.fromJson(reader); - } else if ("waitBefore".equals(fieldName)) { - deserializedScenarioAction.waitBefore = reader.getString(); - } else if ("timeout".equals(fieldName)) { - deserializedScenarioAction.timeout = reader.getString(); - } else if ("externalResource".equals(fieldName)) { - deserializedScenarioAction.externalResource = ExternalResource.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedScenarioAction; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioConfiguration.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioConfiguration.java deleted file mode 100644 index 291ae6b98578..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioConfiguration.java +++ /dev/null @@ -1,250 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.chaos.fluent.models.ScenarioConfigurationInner; - -/** - * An immutable client-side representation of ScenarioConfiguration. - */ -public interface ScenarioConfiguration { - /** - * 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 properties property: The properties of scenario definition. - * - * @return the properties value. - */ - ScenarioConfigurationProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * 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.ScenarioConfigurationInner object. - * - * @return the inner object. - */ - ScenarioConfigurationInner innerModel(); - - /** - * The entirety of the ScenarioConfiguration definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The ScenarioConfiguration definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the ScenarioConfiguration definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the ScenarioConfiguration definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName, scenarioName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @return the next definition stage. - */ - WithCreate withExistingScenario(String resourceGroupName, String workspaceName, String scenarioName); - } - - /** - * The stage of the ScenarioConfiguration definition which contains all the minimum required properties for the - * resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithProperties { - /** - * Executes the create request. - * - * @return the created resource. - */ - ScenarioConfiguration create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - ScenarioConfiguration create(Context context); - } - - /** - * The stage of the ScenarioConfiguration definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The properties of scenario definition.. - * - * @param properties The properties of scenario definition. - * @return the next definition stage. - */ - WithCreate withProperties(ScenarioConfigurationProperties properties); - } - } - - /** - * Begins update for the ScenarioConfiguration resource. - * - * @return the stage of resource update. - */ - ScenarioConfiguration.Update update(); - - /** - * The template for ScenarioConfiguration update. - */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - ScenarioConfiguration apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - ScenarioConfiguration apply(Context context); - } - - /** - * The ScenarioConfiguration update stages. - */ - interface UpdateStages { - /** - * The stage of the ScenarioConfiguration update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The properties of scenario definition.. - * - * @param properties The properties of scenario definition. - * @return the next definition stage. - */ - Update withProperties(ScenarioConfigurationProperties properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - ScenarioConfiguration refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - ScenarioConfiguration refresh(Context context); - - /** - * Execute the scenario execution with the given scenario configuration. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - ScenarioConfigurationsExecuteResponse executeWithResponse(Context context); - - /** - * Execute the scenario execution with the given scenario configuration. - * - * @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 execute(); - - /** - * Validate the given scenario configuration. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - Validation validate(); - - /** - * Validate the given scenario configuration. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - Validation validate(Context context); - - /** - * Fixes resource permissions for the given scenario configuration. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - PermissionsFix fixResourcePermissions(); - - /** - * Fixes resource permissions for the given scenario configuration. - * - * @param body The body parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - PermissionsFix fixResourcePermissions(FixResourcePermissionsRequest body, Context context); -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioConfigurationProperties.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioConfigurationProperties.java deleted file mode 100644 index 3ea1816ab52e..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioConfigurationProperties.java +++ /dev/null @@ -1,194 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Model that represents the properties of the scenario configuration. - */ -@Fluent -public final class ScenarioConfigurationProperties implements JsonSerializable { - /* - * Resource ID of the scenario this configuration applies to. - */ - private String scenarioId; - - /* - * Runtime parameter values for the scenario. Keys must match parameter names defined in the scenario. - */ - private List parameters; - - /* - * Exclusion criteria for protecting resources from fault injection. - */ - private ConfigurationExclusions exclusions; - - /* - * Most recent provisioning state for the given scenario resource. - */ - private ProvisioningState provisioningState; - - /* - * Filter criteria used to constrain which discovered resources participate in fault injection. - */ - private ConfigurationFilters filters; - - /** - * Creates an instance of ScenarioConfigurationProperties class. - */ - public ScenarioConfigurationProperties() { - } - - /** - * Get the scenarioId property: Resource ID of the scenario this configuration applies to. - * - * @return the scenarioId value. - */ - public String scenarioId() { - return this.scenarioId; - } - - /** - * Set the scenarioId property: Resource ID of the scenario this configuration applies to. - * - * @param scenarioId the scenarioId value to set. - * @return the ScenarioConfigurationProperties object itself. - */ - public ScenarioConfigurationProperties withScenarioId(String scenarioId) { - this.scenarioId = scenarioId; - return this; - } - - /** - * Get the parameters property: Runtime parameter values for the scenario. Keys must match parameter names defined - * in the scenario. - * - * @return the parameters value. - */ - public List parameters() { - return this.parameters; - } - - /** - * Set the parameters property: Runtime parameter values for the scenario. Keys must match parameter names defined - * in the scenario. - * - * @param parameters the parameters value to set. - * @return the ScenarioConfigurationProperties object itself. - */ - public ScenarioConfigurationProperties withParameters(List parameters) { - this.parameters = parameters; - return this; - } - - /** - * Get the exclusions property: Exclusion criteria for protecting resources from fault injection. - * - * @return the exclusions value. - */ - public ConfigurationExclusions exclusions() { - return this.exclusions; - } - - /** - * Set the exclusions property: Exclusion criteria for protecting resources from fault injection. - * - * @param exclusions the exclusions value to set. - * @return the ScenarioConfigurationProperties object itself. - */ - public ScenarioConfigurationProperties withExclusions(ConfigurationExclusions exclusions) { - this.exclusions = exclusions; - return this; - } - - /** - * Get the provisioningState property: Most recent provisioning state for the given scenario resource. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the filters property: Filter criteria used to constrain which discovered resources participate in fault - * injection. - * - * @return the filters value. - */ - public ConfigurationFilters filters() { - return this.filters; - } - - /** - * Set the filters property: Filter criteria used to constrain which discovered resources participate in fault - * injection. - * - * @param filters the filters value to set. - * @return the ScenarioConfigurationProperties object itself. - */ - public ScenarioConfigurationProperties withFilters(ConfigurationFilters filters) { - this.filters = filters; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("scenarioId", this.scenarioId); - jsonWriter.writeArrayField("parameters", this.parameters, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("exclusions", this.exclusions); - jsonWriter.writeJsonField("filters", this.filters); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ScenarioConfigurationProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ScenarioConfigurationProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ScenarioConfigurationProperties. - */ - public static ScenarioConfigurationProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ScenarioConfigurationProperties deserializedScenarioConfigurationProperties - = new ScenarioConfigurationProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("scenarioId".equals(fieldName)) { - deserializedScenarioConfigurationProperties.scenarioId = reader.getString(); - } else if ("parameters".equals(fieldName)) { - List parameters = reader.readArray(reader1 -> KeyValuePair.fromJson(reader1)); - deserializedScenarioConfigurationProperties.parameters = parameters; - } else if ("exclusions".equals(fieldName)) { - deserializedScenarioConfigurationProperties.exclusions = ConfigurationExclusions.fromJson(reader); - } else if ("provisioningState".equals(fieldName)) { - deserializedScenarioConfigurationProperties.provisioningState - = ProvisioningState.fromString(reader.getString()); - } else if ("filters".equals(fieldName)) { - deserializedScenarioConfigurationProperties.filters = ConfigurationFilters.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedScenarioConfigurationProperties; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioConfigurations.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioConfigurations.java deleted file mode 100644 index df8edc780272..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioConfigurations.java +++ /dev/null @@ -1,245 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of ScenarioConfigurations. - */ -public interface ScenarioConfigurations { - /** - * Get a scenario definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a scenario definition along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String workspaceName, String scenarioName, - String scenarioConfigurationName, Context context); - - /** - * Get a scenario definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @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 scenario definition. - */ - ScenarioConfiguration get(String resourceGroupName, String workspaceName, String scenarioName, - String scenarioConfigurationName); - - /** - * Delete a scenario definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String scenarioName, String scenarioConfigurationName); - - /** - * Delete a scenario definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String workspaceName, String scenarioName, String scenarioConfigurationName, - Context context); - - /** - * Get a list of scenario definitions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @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 scenario definitions as paginated response with {@link PagedIterable}. - */ - PagedIterable listAll(String resourceGroupName, String workspaceName, String scenarioName); - - /** - * Get a list of scenario definitions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of scenario definitions as paginated response with {@link PagedIterable}. - */ - PagedIterable listAll(String resourceGroupName, String workspaceName, String scenarioName, - Context context); - - /** - * Execute the scenario execution with the given scenario configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - ScenarioConfigurationsExecuteResponse executeWithResponse(String resourceGroupName, String workspaceName, - String scenarioName, String scenarioConfigurationName, Context context); - - /** - * Execute the scenario execution with the given scenario configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @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. - */ - void execute(String resourceGroupName, String workspaceName, String scenarioName, String scenarioConfigurationName); - - /** - * Validate the given scenario configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - Validation validate(String resourceGroupName, String workspaceName, String scenarioName, - String scenarioConfigurationName); - - /** - * Validate the given scenario configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - Validation validate(String resourceGroupName, String workspaceName, String scenarioName, - String scenarioConfigurationName, Context context); - - /** - * Fixes resource permissions for the given scenario configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - PermissionsFix fixResourcePermissions(String resourceGroupName, String workspaceName, String scenarioName, - String scenarioConfigurationName); - - /** - * Fixes resource permissions for the given scenario configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param scenarioConfigurationName Name of the scenario definition. - * @param body The body parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - PermissionsFix fixResourcePermissions(String resourceGroupName, String workspaceName, String scenarioName, - String scenarioConfigurationName, FixResourcePermissionsRequest body, Context context); - - /** - * Get a scenario definition. - * - * @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. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a scenario definition along with {@link Response}. - */ - ScenarioConfiguration getById(String id); - - /** - * Get a scenario definition. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a scenario definition along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a scenario definition. - * - * @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. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete a scenario definition. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new ScenarioConfiguration resource. - * - * @param name resource name. - * @return the first stage of the new ScenarioConfiguration definition. - */ - ScenarioConfiguration.DefinitionStages.Blank define(String name); -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioConfigurationsExecuteHeaders.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioConfigurationsExecuteHeaders.java deleted file mode 100644 index cbef26d61b78..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioConfigurationsExecuteHeaders.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.http.HttpHeaderName; -import com.azure.core.http.HttpHeaders; - -/** - * The ScenarioConfigurationsExecuteHeaders model. - */ -@Immutable -public final class ScenarioConfigurationsExecuteHeaders { - /* - * The Location property. - */ - private final String location; - - /* - * The Retry-After property. - */ - private final Integer retryAfter; - - // HttpHeaders containing the raw property values. - /** - * Creates an instance of ScenarioConfigurationsExecuteHeaders class. - * - * @param rawHeaders The raw HttpHeaders that will be used to create the property values. - */ - public ScenarioConfigurationsExecuteHeaders(HttpHeaders rawHeaders) { - this.location = rawHeaders.getValue(HttpHeaderName.LOCATION); - String retryAfter = rawHeaders.getValue(HttpHeaderName.RETRY_AFTER); - if (retryAfter != null) { - this.retryAfter = Integer.parseInt(retryAfter); - } else { - this.retryAfter = null; - } - } - - /** - * Get the location property: The Location property. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Get the retryAfter property: The Retry-After property. - * - * @return the retryAfter value. - */ - public Integer retryAfter() { - return this.retryAfter; - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioConfigurationsExecuteResponse.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioConfigurationsExecuteResponse.java deleted file mode 100644 index 00f7c16383cd..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioConfigurationsExecuteResponse.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; - -/** - * Contains all response data for the execute operation. - */ -public final class ScenarioConfigurationsExecuteResponse - extends ResponseBase { - /** - * Creates an instance of ScenarioConfigurationsExecuteResponse. - * - * @param request the request which resulted in this ScenarioConfigurationsExecuteResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public ScenarioConfigurationsExecuteResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, - Void value, ScenarioConfigurationsExecuteHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioErrors.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioErrors.java deleted file mode 100644 index 5ea9f62a6d07..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioErrors.java +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Model that represents the scenario run errors. - */ -@Immutable -public final class ScenarioErrors implements JsonSerializable { - /* - * Error code for internal server errors. - */ - private String errorCode; - - /* - * Error message for internal server errors. - */ - private String errorMessage; - - /* - * Any permission errors associated with the scenario run. - */ - private List permission; - - /* - * Any resource state errors associated with the scenario run. - */ - private List resource; - - /** - * Creates an instance of ScenarioErrors class. - */ - private ScenarioErrors() { - } - - /** - * Get the errorCode property: Error code for internal server errors. - * - * @return the errorCode value. - */ - public String errorCode() { - return this.errorCode; - } - - /** - * Get the errorMessage property: Error message for internal server errors. - * - * @return the errorMessage value. - */ - public String errorMessage() { - return this.errorMessage; - } - - /** - * Get the permission property: Any permission errors associated with the scenario run. - * - * @return the permission value. - */ - public List permission() { - return this.permission; - } - - /** - * Get the resource property: Any resource state errors associated with the scenario run. - * - * @return the resource value. - */ - public List resource() { - return this.resource; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("errorCode", this.errorCode); - jsonWriter.writeStringField("errorMessage", this.errorMessage); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ScenarioErrors from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ScenarioErrors if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ScenarioErrors. - */ - public static ScenarioErrors fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ScenarioErrors deserializedScenarioErrors = new ScenarioErrors(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("permission".equals(fieldName)) { - List permission = reader.readArray(reader1 -> PermissionError.fromJson(reader1)); - deserializedScenarioErrors.permission = permission; - } else if ("resource".equals(fieldName)) { - List resource - = reader.readArray(reader1 -> ResourceStateError.fromJson(reader1)); - deserializedScenarioErrors.resource = resource; - } else if ("errorCode".equals(fieldName)) { - deserializedScenarioErrors.errorCode = reader.getString(); - } else if ("errorMessage".equals(fieldName)) { - deserializedScenarioErrors.errorMessage = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedScenarioErrors; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioEvaluationResultItem.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioEvaluationResultItem.java deleted file mode 100644 index d29bcb1e6cff..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioEvaluationResultItem.java +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Model that represents a single scenario evaluation result. - */ -@Immutable -public final class ScenarioEvaluationResultItem implements JsonSerializable { - /* - * The name of the scenario that was evaluated. - */ - private String scenarioName; - - /* - * The evaluation result for this scenario. - */ - private RecommendationStatus evaluationResult; - - /** - * Creates an instance of ScenarioEvaluationResultItem class. - */ - private ScenarioEvaluationResultItem() { - } - - /** - * Get the scenarioName property: The name of the scenario that was evaluated. - * - * @return the scenarioName value. - */ - public String scenarioName() { - return this.scenarioName; - } - - /** - * Get the evaluationResult property: The evaluation result for this scenario. - * - * @return the evaluationResult value. - */ - public RecommendationStatus evaluationResult() { - return this.evaluationResult; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("scenarioName", this.scenarioName); - jsonWriter.writeStringField("evaluationResult", - this.evaluationResult == null ? null : this.evaluationResult.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ScenarioEvaluationResultItem from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ScenarioEvaluationResultItem if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ScenarioEvaluationResultItem. - */ - public static ScenarioEvaluationResultItem fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ScenarioEvaluationResultItem deserializedScenarioEvaluationResultItem = new ScenarioEvaluationResultItem(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("scenarioName".equals(fieldName)) { - deserializedScenarioEvaluationResultItem.scenarioName = reader.getString(); - } else if ("evaluationResult".equals(fieldName)) { - deserializedScenarioEvaluationResultItem.evaluationResult - = RecommendationStatus.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedScenarioEvaluationResultItem; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioParameter.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioParameter.java deleted file mode 100644 index fdcfbd181e67..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioParameter.java +++ /dev/null @@ -1,198 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Model that represents a single scenario parameter definition. - */ -@Fluent -public final class ScenarioParameter implements JsonSerializable { - /* - * The name of the parameter. - */ - private String name; - - /* - * Parameter data type. - */ - private ParameterType type; - - /* - * Default value for the parameter. - */ - private String defaultProperty; - - /* - * Whether this parameter is required. - */ - private Boolean required; - - /* - * Description of the parameter. - */ - private String description; - - /** - * Creates an instance of ScenarioParameter class. - */ - public ScenarioParameter() { - } - - /** - * Get the name property: The name of the parameter. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The name of the parameter. - * - * @param name the name value to set. - * @return the ScenarioParameter object itself. - */ - public ScenarioParameter withName(String name) { - this.name = name; - return this; - } - - /** - * Get the type property: Parameter data type. - * - * @return the type value. - */ - public ParameterType type() { - return this.type; - } - - /** - * Set the type property: Parameter data type. - * - * @param type the type value to set. - * @return the ScenarioParameter object itself. - */ - public ScenarioParameter withType(ParameterType type) { - this.type = type; - return this; - } - - /** - * Get the defaultProperty property: Default value for the parameter. - * - * @return the defaultProperty value. - */ - public String defaultProperty() { - return this.defaultProperty; - } - - /** - * Set the defaultProperty property: Default value for the parameter. - * - * @param defaultProperty the defaultProperty value to set. - * @return the ScenarioParameter object itself. - */ - public ScenarioParameter withDefaultProperty(String defaultProperty) { - this.defaultProperty = defaultProperty; - return this; - } - - /** - * Get the required property: Whether this parameter is required. - * - * @return the required value. - */ - public Boolean required() { - return this.required; - } - - /** - * Set the required property: Whether this parameter is required. - * - * @param required the required value to set. - * @return the ScenarioParameter object itself. - */ - public ScenarioParameter withRequired(Boolean required) { - this.required = required; - return this; - } - - /** - * Get the description property: Description of the parameter. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: Description of the parameter. - * - * @param description the description value to set. - * @return the ScenarioParameter object itself. - */ - public ScenarioParameter withDescription(String description) { - this.description = description; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - jsonWriter.writeStringField("default", this.defaultProperty); - jsonWriter.writeBooleanField("required", this.required); - jsonWriter.writeStringField("description", this.description); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ScenarioParameter from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ScenarioParameter if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ScenarioParameter. - */ - public static ScenarioParameter fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ScenarioParameter deserializedScenarioParameter = new ScenarioParameter(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedScenarioParameter.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedScenarioParameter.type = ParameterType.fromString(reader.getString()); - } else if ("default".equals(fieldName)) { - deserializedScenarioParameter.defaultProperty = reader.getString(); - } else if ("required".equals(fieldName)) { - deserializedScenarioParameter.required = reader.getNullable(JsonReader::getBoolean); - } else if ("description".equals(fieldName)) { - deserializedScenarioParameter.description = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedScenarioParameter; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioProperties.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioProperties.java deleted file mode 100644 index eaa5cba770e7..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioProperties.java +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Model that represents the properties of the scenario. - */ -@Fluent -public final class ScenarioProperties implements JsonSerializable { - /* - * Most recent provisioning state for the given scenario resource. - */ - private ProvisioningState provisioningState; - - /* - * Resource ID of the template version this scenario was created from (optional). - */ - private String createdFrom; - - /* - * Version of the scenario. - */ - private String version; - - /* - * Description of what this scenario does (optional). - */ - private String description; - - /* - * Parameter definitions for the scenario. - */ - private List parameters; - - /* - * Array of actions that define the scenario's orchestration. - */ - private List actions; - - /* - * The recommendation information for this scenario. - */ - private Recommendation recommendation; - - /** - * Creates an instance of ScenarioProperties class. - */ - public ScenarioProperties() { - } - - /** - * Get the provisioningState property: Most recent provisioning state for the given scenario resource. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the createdFrom property: Resource ID of the template version this scenario was created from (optional). - * - * @return the createdFrom value. - */ - public String createdFrom() { - return this.createdFrom; - } - - /** - * Get the version property: Version of the scenario. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Get the description property: Description of what this scenario does (optional). - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: Description of what this scenario does (optional). - * - * @param description the description value to set. - * @return the ScenarioProperties object itself. - */ - public ScenarioProperties withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the parameters property: Parameter definitions for the scenario. - * - * @return the parameters value. - */ - public List parameters() { - return this.parameters; - } - - /** - * Set the parameters property: Parameter definitions for the scenario. - * - * @param parameters the parameters value to set. - * @return the ScenarioProperties object itself. - */ - public ScenarioProperties withParameters(List parameters) { - this.parameters = parameters; - return this; - } - - /** - * Get the actions property: Array of actions that define the scenario's orchestration. - * - * @return the actions value. - */ - public List actions() { - return this.actions; - } - - /** - * Set the actions property: Array of actions that define the scenario's orchestration. - * - * @param actions the actions value to set. - * @return the ScenarioProperties object itself. - */ - public ScenarioProperties withActions(List actions) { - this.actions = actions; - return this; - } - - /** - * Get the recommendation property: The recommendation information for this scenario. - * - * @return the recommendation value. - */ - public Recommendation recommendation() { - return this.recommendation; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("parameters", this.parameters, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("actions", this.actions, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("description", this.description); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ScenarioProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ScenarioProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ScenarioProperties. - */ - public static ScenarioProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ScenarioProperties deserializedScenarioProperties = new ScenarioProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("parameters".equals(fieldName)) { - List parameters - = reader.readArray(reader1 -> ScenarioParameter.fromJson(reader1)); - deserializedScenarioProperties.parameters = parameters; - } else if ("actions".equals(fieldName)) { - List actions = reader.readArray(reader1 -> ScenarioAction.fromJson(reader1)); - deserializedScenarioProperties.actions = actions; - } else if ("provisioningState".equals(fieldName)) { - deserializedScenarioProperties.provisioningState = ProvisioningState.fromString(reader.getString()); - } else if ("createdFrom".equals(fieldName)) { - deserializedScenarioProperties.createdFrom = reader.getString(); - } else if ("version".equals(fieldName)) { - deserializedScenarioProperties.version = reader.getString(); - } else if ("description".equals(fieldName)) { - deserializedScenarioProperties.description = reader.getString(); - } else if ("recommendation".equals(fieldName)) { - deserializedScenarioProperties.recommendation = Recommendation.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedScenarioProperties; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRun.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRun.java deleted file mode 100644 index 99e95d53b950..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRun.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.chaos.fluent.models.ScenarioRunInner; - -/** - * An immutable client-side representation of ScenarioRun. - */ -public interface ScenarioRun { - /** - * 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 properties property: The properties of scenario run. - * - * @return the properties value. - */ - ScenarioRunProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the inner com.azure.resourcemanager.chaos.fluent.models.ScenarioRunInner object. - * - * @return the inner object. - */ - ScenarioRunInner innerModel(); -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunProperties.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunProperties.java deleted file mode 100644 index f47c286bdca8..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunProperties.java +++ /dev/null @@ -1,280 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.List; - -/** - * Model that represents the properties of the scenario run. - */ -@Immutable -public final class ScenarioRunProperties implements JsonSerializable { - /* - * The workspace name. - */ - private String workspaceName; - - /* - * The scenario name. - */ - private String scenarioName; - - /* - * The scenario configuration name. - */ - private String scenarioConfigurationName; - - /* - * The principal id for the managed identity used for the run. - */ - private String managedIdentityPrincipalId; - - /* - * The scenario run status. - */ - private ScenarioRunState status; - - /* - * All resources discovered for the scenario run. - */ - private List resources; - - /* - * System or infrastructure errors encountered during the scenario run. - */ - private List errors; - - /* - * Business errors from fault injection — permission and resource state issues. - */ - private ScenarioErrors executionErrors; - - /* - * The scenario run json. - */ - private String scenarioRunJson; - - /* - * The scenario run summary. - */ - private List scenarioRunSummary; - - /* - * When the scenario run was started. - */ - private OffsetDateTime startTime; - - /* - * When the scenario run was completed. - */ - private OffsetDateTime endTime; - - /* - * Zone resolution information. Present when the scenario configuration - * used physical zone targeting (`physicalZones`). Contains the mode, - * requested physical zones, and per-subscription logical zone mappings. - */ - private ZoneResolutionInfo zoneResolution; - - /** - * Creates an instance of ScenarioRunProperties class. - */ - private ScenarioRunProperties() { - } - - /** - * Get the workspaceName property: The workspace name. - * - * @return the workspaceName value. - */ - public String workspaceName() { - return this.workspaceName; - } - - /** - * Get the scenarioName property: The scenario name. - * - * @return the scenarioName value. - */ - public String scenarioName() { - return this.scenarioName; - } - - /** - * Get the scenarioConfigurationName property: The scenario configuration name. - * - * @return the scenarioConfigurationName value. - */ - public String scenarioConfigurationName() { - return this.scenarioConfigurationName; - } - - /** - * Get the managedIdentityPrincipalId property: The principal id for the managed identity used for the run. - * - * @return the managedIdentityPrincipalId value. - */ - public String managedIdentityPrincipalId() { - return this.managedIdentityPrincipalId; - } - - /** - * Get the status property: The scenario run status. - * - * @return the status value. - */ - public ScenarioRunState status() { - return this.status; - } - - /** - * Get the resources property: All resources discovered for the scenario run. - * - * @return the resources value. - */ - public List resources() { - return this.resources; - } - - /** - * Get the errors property: System or infrastructure errors encountered during the scenario run. - * - * @return the errors value. - */ - public List errors() { - return this.errors; - } - - /** - * Get the executionErrors property: Business errors from fault injection — permission and resource state issues. - * - * @return the executionErrors value. - */ - public ScenarioErrors executionErrors() { - return this.executionErrors; - } - - /** - * Get the scenarioRunJson property: The scenario run json. - * - * @return the scenarioRunJson value. - */ - public String scenarioRunJson() { - return this.scenarioRunJson; - } - - /** - * Get the scenarioRunSummary property: The scenario run summary. - * - * @return the scenarioRunSummary value. - */ - public List scenarioRunSummary() { - return this.scenarioRunSummary; - } - - /** - * Get the startTime property: When the scenario run was started. - * - * @return the startTime value. - */ - public OffsetDateTime startTime() { - return this.startTime; - } - - /** - * Get the endTime property: When the scenario run was completed. - * - * @return the endTime value. - */ - public OffsetDateTime endTime() { - return this.endTime; - } - - /** - * Get the zoneResolution property: Zone resolution information. Present when the scenario configuration - * used physical zone targeting (`physicalZones`). Contains the mode, - * requested physical zones, and per-subscription logical zone mappings. - * - * @return the zoneResolution value. - */ - public ZoneResolutionInfo zoneResolution() { - return this.zoneResolution; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ScenarioRunProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ScenarioRunProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ScenarioRunProperties. - */ - public static ScenarioRunProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ScenarioRunProperties deserializedScenarioRunProperties = new ScenarioRunProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("workspaceName".equals(fieldName)) { - deserializedScenarioRunProperties.workspaceName = reader.getString(); - } else if ("scenarioName".equals(fieldName)) { - deserializedScenarioRunProperties.scenarioName = reader.getString(); - } else if ("scenarioConfigurationName".equals(fieldName)) { - deserializedScenarioRunProperties.scenarioConfigurationName = reader.getString(); - } else if ("managedIdentityPrincipalId".equals(fieldName)) { - deserializedScenarioRunProperties.managedIdentityPrincipalId = reader.getString(); - } else if ("status".equals(fieldName)) { - deserializedScenarioRunProperties.status = ScenarioRunState.fromString(reader.getString()); - } else if ("resources".equals(fieldName)) { - List resources - = reader.readArray(reader1 -> ScenarioRunResource.fromJson(reader1)); - deserializedScenarioRunProperties.resources = resources; - } else if ("startTime".equals(fieldName)) { - deserializedScenarioRunProperties.startTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("errors".equals(fieldName)) { - List errors = reader.readArray(reader1 -> OperationError.fromJson(reader1)); - deserializedScenarioRunProperties.errors = errors; - } else if ("executionErrors".equals(fieldName)) { - deserializedScenarioRunProperties.executionErrors = ScenarioErrors.fromJson(reader); - } else if ("scenarioRunJson".equals(fieldName)) { - deserializedScenarioRunProperties.scenarioRunJson = reader.getString(); - } else if ("scenarioRunSummary".equals(fieldName)) { - List scenarioRunSummary - = reader.readArray(reader1 -> ScenarioRunSummaryAction.fromJson(reader1)); - deserializedScenarioRunProperties.scenarioRunSummary = scenarioRunSummary; - } else if ("endTime".equals(fieldName)) { - deserializedScenarioRunProperties.endTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("zoneResolution".equals(fieldName)) { - deserializedScenarioRunProperties.zoneResolution = ZoneResolutionInfo.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedScenarioRunProperties; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunResource.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunResource.java deleted file mode 100644 index c3418f5389b5..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunResource.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Model that represents the scenario run resource. - */ -@Immutable -public final class ScenarioRunResource implements JsonSerializable { - /* - * The resource id. - */ - private String id; - - /** - * Creates an instance of ScenarioRunResource class. - */ - private ScenarioRunResource() { - } - - /** - * Get the id property: The resource id. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ScenarioRunResource from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ScenarioRunResource if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ScenarioRunResource. - */ - public static ScenarioRunResource fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ScenarioRunResource deserializedScenarioRunResource = new ScenarioRunResource(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedScenarioRunResource.id = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedScenarioRunResource; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunState.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunState.java deleted file mode 100644 index 3d4645ec3e63..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunState.java +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Enum of the scenario run state. - */ -public final class ScenarioRunState extends ExpandableStringEnum { - /** - * The scenario run has been queued and is waiting to start. - */ - public static final ScenarioRunState QUEUED = fromString("Queued"); - - /** - * The scenario run is in the process of being resolved. - */ - public static final ScenarioRunState RESOLVING = fromString("Resolving"); - - /** - * The scenario run is in the process of being generated. - */ - public static final ScenarioRunState GENERATING = fromString("Generating"); - - /** - * The scenario run is in the process of being validated. - */ - public static final ScenarioRunState VALIDATING = fromString("Validating"); - - /** - * The scenario run validation has completed successfully. - */ - public static final ScenarioRunState VALIDATION_SUCCEEDED = fromString("ValidationSucceeded"); - - /** - * The scenario run is in the process of being started. - */ - public static final ScenarioRunState STARTING = fromString("Starting"); - - /** - * The scenario run is in the process of being prepared. - */ - public static final ScenarioRunState PREPARING = fromString("Preparing"); - - /** - * The scenario run is in the process of running. - */ - public static final ScenarioRunState RUNNING = fromString("Running"); - - /** - * The scenario run is in the process of being cleaned up. - */ - public static final ScenarioRunState CLEANING_UP = fromString("CleaningUp"); - - /** - * The scenario run is in the process of being canceled. - */ - public static final ScenarioRunState CANCELING = fromString("Canceling"); - - /** - * The scenario run has been canceled. - */ - public static final ScenarioRunState CANCELED = fromString("Canceled"); - - /** - * The scenario run has completed successfully. - */ - public static final ScenarioRunState SUCCEEDED = fromString("Succeeded"); - - /** - * The scenario run has failed. - */ - public static final ScenarioRunState FAILED = fromString("Failed"); - - /** - * Creates a new instance of ScenarioRunState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ScenarioRunState() { - } - - /** - * Creates or finds a ScenarioRunState from its string representation. - * - * @param name a name to look for. - * @return the corresponding ScenarioRunState. - */ - public static ScenarioRunState fromString(String name) { - return fromString(name, ScenarioRunState.class); - } - - /** - * Gets known ScenarioRunState values. - * - * @return known ScenarioRunState values. - */ - public static Collection values() { - return values(ScenarioRunState.class); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunSummaryAction.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunSummaryAction.java deleted file mode 100644 index a49ba9a0114c..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunSummaryAction.java +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.List; - -/** - * Model that represents the scenario run action. - */ -@Immutable -public final class ScenarioRunSummaryAction implements JsonSerializable { - /* - * The resources associated with the specified action. - */ - private List resources; - - /* - * The urn for the given chaos action. - */ - private String actionUrn; - - /* - * The state of the action. - */ - private ScenarioSummaryState state; - - /* - * When the action was started. - */ - private OffsetDateTime startedAt; - - /* - * When the action was completed. - */ - private OffsetDateTime completedAt; - - /** - * Creates an instance of ScenarioRunSummaryAction class. - */ - private ScenarioRunSummaryAction() { - } - - /** - * Get the resources property: The resources associated with the specified action. - * - * @return the resources value. - */ - public List resources() { - return this.resources; - } - - /** - * Get the actionUrn property: The urn for the given chaos action. - * - * @return the actionUrn value. - */ - public String actionUrn() { - return this.actionUrn; - } - - /** - * Get the state property: The state of the action. - * - * @return the state value. - */ - public ScenarioSummaryState state() { - return this.state; - } - - /** - * Get the startedAt property: When the action was started. - * - * @return the startedAt value. - */ - public OffsetDateTime startedAt() { - return this.startedAt; - } - - /** - * Get the completedAt property: When the action was completed. - * - * @return the completedAt value. - */ - public OffsetDateTime completedAt() { - return this.completedAt; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ScenarioRunSummaryAction from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ScenarioRunSummaryAction if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ScenarioRunSummaryAction. - */ - public static ScenarioRunSummaryAction fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ScenarioRunSummaryAction deserializedScenarioRunSummaryAction = new ScenarioRunSummaryAction(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("resources".equals(fieldName)) { - List resources - = reader.readArray(reader1 -> ScenarioRunResource.fromJson(reader1)); - deserializedScenarioRunSummaryAction.resources = resources; - } else if ("actionUrn".equals(fieldName)) { - deserializedScenarioRunSummaryAction.actionUrn = reader.getString(); - } else if ("state".equals(fieldName)) { - deserializedScenarioRunSummaryAction.state = ScenarioSummaryState.fromString(reader.getString()); - } else if ("startedAt".equals(fieldName)) { - deserializedScenarioRunSummaryAction.startedAt = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("completedAt".equals(fieldName)) { - deserializedScenarioRunSummaryAction.completedAt = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else { - reader.skipChildren(); - } - } - - return deserializedScenarioRunSummaryAction; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRuns.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRuns.java deleted file mode 100644 index bcc8aafb627e..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRuns.java +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of ScenarioRuns. - */ -public interface ScenarioRuns { - /** - * Get a scenario run. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param runId The name of the ScenarioRun. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a scenario run. - */ - Response getWithResponse(String resourceGroupName, String workspaceName, String scenarioName, - String runId, Context context); - - /** - * Get a scenario run. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param runId The name of the ScenarioRun. - * @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 scenario run. - */ - ScenarioRun get(String resourceGroupName, String workspaceName, String scenarioName, String runId); - - /** - * Get a list of scenario runs. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @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 scenario runs as paginated response with {@link PagedIterable}. - */ - PagedIterable listAll(String resourceGroupName, String workspaceName, String scenarioName); - - /** - * Get a list of scenario runs. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of scenario runs as paginated response with {@link PagedIterable}. - */ - PagedIterable listAll(String resourceGroupName, String workspaceName, String scenarioName, - Context context); - - /** - * Cancel the currently running scenario execution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param runId The name of the ScenarioRun. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - ScenarioRunsCancelResponse cancelWithResponse(String resourceGroupName, String workspaceName, String scenarioName, - String runId, Context context); - - /** - * Cancel the currently running scenario execution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param runId The name of the ScenarioRun. - * @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. - */ - void cancel(String resourceGroupName, String workspaceName, String scenarioName, String runId); -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunsCancelHeaders.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunsCancelHeaders.java deleted file mode 100644 index 59474bd08c4b..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunsCancelHeaders.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.http.HttpHeaderName; -import com.azure.core.http.HttpHeaders; - -/** - * The ScenarioRunsCancelHeaders model. - */ -@Immutable -public final class ScenarioRunsCancelHeaders { - /* - * The Location property. - */ - private final String location; - - /* - * The Retry-After property. - */ - private final Integer retryAfter; - - // HttpHeaders containing the raw property values. - /** - * Creates an instance of ScenarioRunsCancelHeaders class. - * - * @param rawHeaders The raw HttpHeaders that will be used to create the property values. - */ - public ScenarioRunsCancelHeaders(HttpHeaders rawHeaders) { - this.location = rawHeaders.getValue(HttpHeaderName.LOCATION); - String retryAfter = rawHeaders.getValue(HttpHeaderName.RETRY_AFTER); - if (retryAfter != null) { - this.retryAfter = Integer.parseInt(retryAfter); - } else { - this.retryAfter = null; - } - } - - /** - * Get the location property: The Location property. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Get the retryAfter property: The Retry-After property. - * - * @return the retryAfter value. - */ - public Integer retryAfter() { - return this.retryAfter; - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunsCancelResponse.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunsCancelResponse.java deleted file mode 100644 index c2f81e5379f6..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunsCancelResponse.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; - -/** - * Contains all response data for the cancel operation. - */ -public final class ScenarioRunsCancelResponse extends ResponseBase { - /** - * Creates an instance of ScenarioRunsCancelResponse. - * - * @param request the request which resulted in this ScenarioRunsCancelResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public ScenarioRunsCancelResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, Void value, - ScenarioRunsCancelHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunsGetHeaders.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunsGetHeaders.java deleted file mode 100644 index 45e000205879..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunsGetHeaders.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.http.HttpHeaderName; -import com.azure.core.http.HttpHeaders; - -/** - * The ScenarioRunsGetHeaders model. - */ -@Immutable -public final class ScenarioRunsGetHeaders { - /* - * The Location property. - */ - private final String location; - - /* - * The Retry-After property. - */ - private final Integer retryAfter; - - // HttpHeaders containing the raw property values. - /** - * Creates an instance of ScenarioRunsGetHeaders class. - * - * @param rawHeaders The raw HttpHeaders that will be used to create the property values. - */ - public ScenarioRunsGetHeaders(HttpHeaders rawHeaders) { - this.location = rawHeaders.getValue(HttpHeaderName.LOCATION); - String retryAfter = rawHeaders.getValue(HttpHeaderName.RETRY_AFTER); - if (retryAfter != null) { - this.retryAfter = Integer.parseInt(retryAfter); - } else { - this.retryAfter = null; - } - } - - /** - * Get the location property: The Location property. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Get the retryAfter property: The Retry-After property. - * - * @return the retryAfter value. - */ - public Integer retryAfter() { - return this.retryAfter; - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunsGetResponse.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunsGetResponse.java deleted file mode 100644 index ab47917d5b07..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunsGetResponse.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; -import com.azure.resourcemanager.chaos.fluent.models.ScenarioRunInner; - -/** - * Contains all response data for the get operation. - */ -public final class ScenarioRunsGetResponse extends ResponseBase { - /** - * Creates an instance of ScenarioRunsGetResponse. - * - * @param request the request which resulted in this ScenarioRunsGetResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public ScenarioRunsGetResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, ScenarioRunInner value, - ScenarioRunsGetHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } - - /** - * Gets the deserialized response body. - * - * @return the deserialized response body. - */ - @Override - public ScenarioRunInner getValue() { - return super.getValue(); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioSummaryState.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioSummaryState.java deleted file mode 100644 index 6f03e2f62896..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioSummaryState.java +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Enum of the scenario run summary action state. - */ -public final class ScenarioSummaryState extends ExpandableStringEnum { - /** - * The action is pending and has not started. - */ - public static final ScenarioSummaryState PENDING = fromString("Pending"); - - /** - * The action is in the process of starting. - */ - public static final ScenarioSummaryState STARTING = fromString("Starting"); - - /** - * The action is in the process of running. - */ - public static final ScenarioSummaryState RUNNING = fromString("Running"); - - /** - * The action is in the process of stopping. - */ - public static final ScenarioSummaryState STOPPING = fromString("Stopping"); - - /** - * The action has completed successfully. - */ - public static final ScenarioSummaryState SUCCEEDED = fromString("Succeeded"); - - /** - * The action is in the process of being canceled. - */ - public static final ScenarioSummaryState CANCELING = fromString("Canceling"); - - /** - * The action has been canceled. - */ - public static final ScenarioSummaryState CANCELED = fromString("Canceled"); - - /** - * The action is failing due to an error. - */ - public static final ScenarioSummaryState FAILING_ON_ERROR = fromString("FailingOnError"); - - /** - * The action has failed. - */ - public static final ScenarioSummaryState FAILED = fromString("Failed"); - - /** - * The action was skipped. - */ - public static final ScenarioSummaryState SKIPPED = fromString("Skipped"); - - /** - * Creates a new instance of ScenarioSummaryState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ScenarioSummaryState() { - } - - /** - * Creates or finds a ScenarioSummaryState from its string representation. - * - * @param name a name to look for. - * @return the corresponding ScenarioSummaryState. - */ - public static ScenarioSummaryState fromString(String name) { - return fromString(name, ScenarioSummaryState.class); - } - - /** - * Gets known ScenarioSummaryState values. - * - * @return known ScenarioSummaryState values. - */ - public static Collection values() { - return values(ScenarioSummaryState.class); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioValidationState.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioValidationState.java deleted file mode 100644 index 51691c94cd3a..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ScenarioValidationState.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Enum of the scenario validation state. - */ -public final class ScenarioValidationState extends ExpandableStringEnum { - /** - * The scenario validation is in a resolving state. - */ - public static final ScenarioValidationState RESOLVING = fromString("Resolving"); - - /** - * The scenario validation is in a generating state. - */ - public static final ScenarioValidationState GENERATING = fromString("Generating"); - - /** - * The scenario validation is in a validating state. - */ - public static final ScenarioValidationState VALIDATING = fromString("Validating"); - - /** - * The scenario validation has been accepted. - */ - public static final ScenarioValidationState ACCEPTED = fromString("Accepted"); - - /** - * The scenario validation has not yet started. - */ - public static final ScenarioValidationState NOT_STARTED = fromString("NotStarted"); - - /** - * The scenario validation reflects a state that requires attention. - * This is a terminal failure state indicating validation issues were found. - */ - public static final ScenarioValidationState REQUIRES_ATTENTION = fromString("RequiresAttention"); - - /** - * The scenario validation found no valid resources to perform fault behaviors against. - * This is a terminal failure state. - */ - public static final ScenarioValidationState NO_RESOLVED_RESOURCES = fromString("NoResolvedResources"); - - /** - * The scenario validation completed successfully and the scenario is ready to execute. - */ - public static final ScenarioValidationState SUCCEEDED = fromString("Succeeded"); - - /** - * Creates a new instance of ScenarioValidationState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ScenarioValidationState() { - } - - /** - * Creates or finds a ScenarioValidationState from its string representation. - * - * @param name a name to look for. - * @return the corresponding ScenarioValidationState. - */ - public static ScenarioValidationState fromString(String name) { - return fromString(name, ScenarioValidationState.class); - } - - /** - * Gets known ScenarioValidationState values. - * - * @return known ScenarioValidationState values. - */ - public static Collection values() { - return values(ScenarioValidationState.class); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Scenarios.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Scenarios.java deleted file mode 100644 index c9be71546916..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Scenarios.java +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of Scenarios. - */ -public interface Scenarios { - /** - * Get a scenario. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a scenario along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String workspaceName, String scenarioName, - Context context); - - /** - * Get a scenario. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @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 scenario. - */ - Scenario get(String resourceGroupName, String workspaceName, String scenarioName); - - /** - * Delete a scenario. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteWithResponse(String resourceGroupName, String workspaceName, String scenarioName, - Context context); - - /** - * Delete a scenario. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param scenarioName Name of the scenario. - * @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. - */ - void delete(String resourceGroupName, String workspaceName, String scenarioName); - - /** - * Get a list of scenarios. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace 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 scenarios as paginated response with {@link PagedIterable}. - */ - PagedIterable listAll(String resourceGroupName, String workspaceName); - - /** - * Get a list of scenarios. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of scenarios as paginated response with {@link PagedIterable}. - */ - PagedIterable listAll(String resourceGroupName, String workspaceName, Context context); - - /** - * Get a scenario. - * - * @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. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a scenario along with {@link Response}. - */ - Scenario getById(String id); - - /** - * Get a scenario. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a scenario along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a scenario. - * - * @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. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete a scenario. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new Scenario resource. - * - * @param name resource name. - * @return the first stage of the new Scenario definition. - */ - Scenario.DefinitionStages.Blank define(String name); -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Validation.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Validation.java deleted file mode 100644 index 05b7eee05de7..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Validation.java +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Concrete proxy resource types can be created by aliasing this type using a specific property type. - */ -@Immutable -public final class Validation extends ProxyResource { - /* - * The resource-specific properties for this resource. - */ - private ValidationProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of Validation class. - */ - private Validation() { - } - - /** - * Get the properties property: The resource-specific properties for this resource. - * - * @return the properties value. - */ - public ValidationProperties properties() { - return this.properties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Validation from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Validation if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the Validation. - */ - public static Validation fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Validation deserializedValidation = new Validation(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedValidation.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedValidation.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedValidation.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedValidation.properties = ValidationProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedValidation.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedValidation; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ValidationProperties.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ValidationProperties.java deleted file mode 100644 index 5e8f8a46fab9..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ValidationProperties.java +++ /dev/null @@ -1,163 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.List; - -/** - * Model that represents the properties of the scenario validation. - */ -@Immutable -public final class ValidationProperties implements JsonSerializable { - /* - * The scenario validation status. - */ - private ScenarioValidationState status; - - /* - * The scenario validation UTC start time. - */ - private OffsetDateTime startTime; - - /* - * Execution plan created from validation. This plan will be executed as-is on next scenario execution. - */ - private String executionPlanJson; - - /* - * The scenario validation UTC end time. - */ - private OffsetDateTime endTime; - - /* - * System or infrastructure errors encountered during validation. - */ - private List errors; - - /* - * Business errors from validation — permission and resource state issues. - */ - private ScenarioErrors validationErrors; - - /** - * Creates an instance of ValidationProperties class. - */ - private ValidationProperties() { - } - - /** - * Get the status property: The scenario validation status. - * - * @return the status value. - */ - public ScenarioValidationState status() { - return this.status; - } - - /** - * Get the startTime property: The scenario validation UTC start time. - * - * @return the startTime value. - */ - public OffsetDateTime startTime() { - return this.startTime; - } - - /** - * Get the executionPlanJson property: Execution plan created from validation. This plan will be executed as-is on - * next scenario execution. - * - * @return the executionPlanJson value. - */ - public String executionPlanJson() { - return this.executionPlanJson; - } - - /** - * Get the endTime property: The scenario validation UTC end time. - * - * @return the endTime value. - */ - public OffsetDateTime endTime() { - return this.endTime; - } - - /** - * Get the errors property: System or infrastructure errors encountered during validation. - * - * @return the errors value. - */ - public List errors() { - return this.errors; - } - - /** - * Get the validationErrors property: Business errors from validation — permission and resource state issues. - * - * @return the validationErrors value. - */ - public ScenarioErrors validationErrors() { - return this.validationErrors; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("executionPlanJson", this.executionPlanJson); - jsonWriter.writeJsonField("validationErrors", this.validationErrors); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ValidationProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ValidationProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ValidationProperties. - */ - public static ValidationProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ValidationProperties deserializedValidationProperties = new ValidationProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("status".equals(fieldName)) { - deserializedValidationProperties.status = ScenarioValidationState.fromString(reader.getString()); - } else if ("startTime".equals(fieldName)) { - deserializedValidationProperties.startTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("executionPlanJson".equals(fieldName)) { - deserializedValidationProperties.executionPlanJson = reader.getString(); - } else if ("endTime".equals(fieldName)) { - deserializedValidationProperties.endTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("errors".equals(fieldName)) { - List errors = reader.readArray(reader1 -> OperationError.fromJson(reader1)); - deserializedValidationProperties.errors = errors; - } else if ("validationErrors".equals(fieldName)) { - deserializedValidationProperties.validationErrors = ScenarioErrors.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedValidationProperties; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Workspace.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Workspace.java deleted file mode 100644 index af8945300ef8..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Workspace.java +++ /dev/null @@ -1,305 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.chaos.fluent.models.WorkspaceInner; -import java.util.Map; - -/** - * An immutable client-side representation of Workspace. - */ -public interface Workspace { - /** - * 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 identity property: The managed service identities assigned to this resource. - * - * @return the identity value. - */ - ResourceIdentity identity(); - - /** - * Gets the properties property: The properties of the Workspace resource. - * - * @return the properties value. - */ - WorkspaceProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * 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.WorkspaceInner object. - * - * @return the inner object. - */ - WorkspaceInner innerModel(); - - /** - * The entirety of the Workspace definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, DefinitionStages.WithProperties, DefinitionStages.WithCreate { - } - - /** - * The Workspace definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the Workspace definition. - */ - interface Blank extends WithLocation { - } - - /** - * The stage of the Workspace 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. - */ - WithResourceGroup withRegion(Region location); - - /** - * 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 Workspace definition allowing to specify parent resource. - */ - interface WithResourceGroup { - /** - * Specifies resourceGroupName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @return the next definition stage. - */ - WithProperties withExistingResourceGroup(String resourceGroupName); - } - - /** - * The stage of the Workspace definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The properties of the Workspace resource.. - * - * @param properties The properties of the Workspace resource. - * @return the next definition stage. - */ - WithCreate withProperties(WorkspaceProperties properties); - } - - /** - * The stage of the Workspace definition which contains all the minimum required properties for the resource to - * be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity { - /** - * Executes the create request. - * - * @return the created resource. - */ - Workspace create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - Workspace create(Context context); - } - - /** - * The stage of the Workspace 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 Workspace definition allowing to specify identity. - */ - interface WithIdentity { - /** - * Specifies the identity property: The managed service identities assigned to this resource.. - * - * @param identity The managed service identities assigned to this resource. - * @return the next definition stage. - */ - WithCreate withIdentity(ResourceIdentity identity); - } - } - - /** - * Begins update for the Workspace resource. - * - * @return the stage of resource update. - */ - Workspace.Update update(); - - /** - * The template for Workspace update. - */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity { - /** - * Executes the update request. - * - * @return the updated resource. - */ - Workspace apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - Workspace apply(Context context); - } - - /** - * The Workspace update stages. - */ - interface UpdateStages { - /** - * The stage of the Workspace update allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - - /** - * The stage of the Workspace update allowing to specify identity. - */ - interface WithIdentity { - /** - * Specifies the identity property: The managed service identities assigned to this resource.. - * - * @param identity The managed service identities assigned to this resource. - * @return the next definition stage. - */ - Update withIdentity(ResourceIdentity identity); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - Workspace refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - Workspace refresh(Context context); - - /** - * Refreshes recommendation status for all scenarios in a given workspace. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - WorkspaceEvaluation refreshRecommendations(); - - /** - * Refreshes recommendation status for all scenarios in a given workspace. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - WorkspaceEvaluation refreshRecommendations(Context context); -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/WorkspaceEvaluation.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/WorkspaceEvaluation.java deleted file mode 100644 index d952dc95b80d..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/WorkspaceEvaluation.java +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Model that represents the latest workspace evaluation result. - */ -@Immutable -public final class WorkspaceEvaluation extends ProxyResource { - /* - * The resource-specific properties for this resource. - */ - private WorkspaceEvaluationProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of WorkspaceEvaluation class. - */ - private WorkspaceEvaluation() { - } - - /** - * Get the properties property: The resource-specific properties for this resource. - * - * @return the properties value. - */ - public WorkspaceEvaluationProperties properties() { - return this.properties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of WorkspaceEvaluation from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of WorkspaceEvaluation if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the WorkspaceEvaluation. - */ - public static WorkspaceEvaluation fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - WorkspaceEvaluation deserializedWorkspaceEvaluation = new WorkspaceEvaluation(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedWorkspaceEvaluation.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedWorkspaceEvaluation.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedWorkspaceEvaluation.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedWorkspaceEvaluation.properties = WorkspaceEvaluationProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedWorkspaceEvaluation.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedWorkspaceEvaluation; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/WorkspaceEvaluationProperties.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/WorkspaceEvaluationProperties.java deleted file mode 100644 index 80a6e7d1a83e..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/WorkspaceEvaluationProperties.java +++ /dev/null @@ -1,249 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.List; - -/** - * Model that represents the properties of the workspace evaluation. - */ -@Immutable -public final class WorkspaceEvaluationProperties implements JsonSerializable { - /* - * The evaluation status. - */ - private WorkspaceEvaluationStatus status; - - /* - * The evaluation UTC start time. - */ - private OffsetDateTime startTime; - - /* - * The evaluation UTC end time. - */ - private OffsetDateTime endTime; - - /* - * System or infrastructure errors encountered during evaluation. - */ - private List errors; - - /* - * The workspace ID this evaluation belongs to. - */ - private String workspaceId; - - /* - * The number of scenarios to evaluate. - */ - private Integer numScenariosToEvaluate; - - /* - * The number of scenarios that evaluated successfully. - */ - private Integer numScenariosEvaluatedSucceeded; - - /* - * The number of scenarios that failed evaluation. - */ - private Integer numScenariosEvaluatedFailed; - - /* - * The number of scenarios that were cancelled during evaluation. - */ - private Integer numScenariosEvaluatedCancelled; - - /* - * The overall evaluation result. - */ - private RecommendationStatus evaluationResult; - - /* - * Per-scenario evaluation results. - */ - private List results; - - /** - * Creates an instance of WorkspaceEvaluationProperties class. - */ - private WorkspaceEvaluationProperties() { - } - - /** - * Get the status property: The evaluation status. - * - * @return the status value. - */ - public WorkspaceEvaluationStatus status() { - return this.status; - } - - /** - * Get the startTime property: The evaluation UTC start time. - * - * @return the startTime value. - */ - public OffsetDateTime startTime() { - return this.startTime; - } - - /** - * Get the endTime property: The evaluation UTC end time. - * - * @return the endTime value. - */ - public OffsetDateTime endTime() { - return this.endTime; - } - - /** - * Get the errors property: System or infrastructure errors encountered during evaluation. - * - * @return the errors value. - */ - public List errors() { - return this.errors; - } - - /** - * Get the workspaceId property: The workspace ID this evaluation belongs to. - * - * @return the workspaceId value. - */ - public String workspaceId() { - return this.workspaceId; - } - - /** - * Get the numScenariosToEvaluate property: The number of scenarios to evaluate. - * - * @return the numScenariosToEvaluate value. - */ - public Integer numScenariosToEvaluate() { - return this.numScenariosToEvaluate; - } - - /** - * Get the numScenariosEvaluatedSucceeded property: The number of scenarios that evaluated successfully. - * - * @return the numScenariosEvaluatedSucceeded value. - */ - public Integer numScenariosEvaluatedSucceeded() { - return this.numScenariosEvaluatedSucceeded; - } - - /** - * Get the numScenariosEvaluatedFailed property: The number of scenarios that failed evaluation. - * - * @return the numScenariosEvaluatedFailed value. - */ - public Integer numScenariosEvaluatedFailed() { - return this.numScenariosEvaluatedFailed; - } - - /** - * Get the numScenariosEvaluatedCancelled property: The number of scenarios that were cancelled during evaluation. - * - * @return the numScenariosEvaluatedCancelled value. - */ - public Integer numScenariosEvaluatedCancelled() { - return this.numScenariosEvaluatedCancelled; - } - - /** - * Get the evaluationResult property: The overall evaluation result. - * - * @return the evaluationResult value. - */ - public RecommendationStatus evaluationResult() { - return this.evaluationResult; - } - - /** - * Get the results property: Per-scenario evaluation results. - * - * @return the results value. - */ - public List results() { - return this.results; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of WorkspaceEvaluationProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of WorkspaceEvaluationProperties if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the WorkspaceEvaluationProperties. - */ - public static WorkspaceEvaluationProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - WorkspaceEvaluationProperties deserializedWorkspaceEvaluationProperties - = new WorkspaceEvaluationProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("status".equals(fieldName)) { - deserializedWorkspaceEvaluationProperties.status - = WorkspaceEvaluationStatus.fromString(reader.getString()); - } else if ("workspaceId".equals(fieldName)) { - deserializedWorkspaceEvaluationProperties.workspaceId = reader.getString(); - } else if ("startTime".equals(fieldName)) { - deserializedWorkspaceEvaluationProperties.startTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("endTime".equals(fieldName)) { - deserializedWorkspaceEvaluationProperties.endTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("errors".equals(fieldName)) { - List errors = reader.readArray(reader1 -> OperationError.fromJson(reader1)); - deserializedWorkspaceEvaluationProperties.errors = errors; - } else if ("numScenariosToEvaluate".equals(fieldName)) { - deserializedWorkspaceEvaluationProperties.numScenariosToEvaluate - = reader.getNullable(JsonReader::getInt); - } else if ("numScenariosEvaluatedSucceeded".equals(fieldName)) { - deserializedWorkspaceEvaluationProperties.numScenariosEvaluatedSucceeded - = reader.getNullable(JsonReader::getInt); - } else if ("numScenariosEvaluatedFailed".equals(fieldName)) { - deserializedWorkspaceEvaluationProperties.numScenariosEvaluatedFailed - = reader.getNullable(JsonReader::getInt); - } else if ("numScenariosEvaluatedCancelled".equals(fieldName)) { - deserializedWorkspaceEvaluationProperties.numScenariosEvaluatedCancelled - = reader.getNullable(JsonReader::getInt); - } else if ("evaluationResult".equals(fieldName)) { - deserializedWorkspaceEvaluationProperties.evaluationResult - = RecommendationStatus.fromString(reader.getString()); - } else if ("results".equals(fieldName)) { - List results - = reader.readArray(reader1 -> ScenarioEvaluationResultItem.fromJson(reader1)); - deserializedWorkspaceEvaluationProperties.results = results; - } else { - reader.skipChildren(); - } - } - - return deserializedWorkspaceEvaluationProperties; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/WorkspaceEvaluationStatus.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/WorkspaceEvaluationStatus.java deleted file mode 100644 index 73dec37cd7e3..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/WorkspaceEvaluationStatus.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Enum of the workspace evaluation status. - */ -public final class WorkspaceEvaluationStatus extends ExpandableStringEnum { - /** - * The evaluation is pending and has not started. - */ - public static final WorkspaceEvaluationStatus PENDING = fromString("Pending"); - - /** - * The evaluation has been accepted and is queued for execution. - */ - public static final WorkspaceEvaluationStatus QUEUED = fromString("Queued"); - - /** - * The evaluation is in progress. - */ - public static final WorkspaceEvaluationStatus IN_PROGRESS = fromString("InProgress"); - - /** - * The evaluation completed successfully. - */ - public static final WorkspaceEvaluationStatus SUCCEEDED = fromString("Succeeded"); - - /** - * The evaluation partially succeeded — some scenarios succeeded while others failed. - */ - public static final WorkspaceEvaluationStatus PARTIALLY_SUCCEEDED = fromString("PartiallySucceeded"); - - /** - * The evaluation failed. - */ - public static final WorkspaceEvaluationStatus FAILED = fromString("Failed"); - - /** - * The evaluation was canceled. - */ - public static final WorkspaceEvaluationStatus CANCELED = fromString("Canceled"); - - /** - * Creates a new instance of WorkspaceEvaluationStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public WorkspaceEvaluationStatus() { - } - - /** - * Creates or finds a WorkspaceEvaluationStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding WorkspaceEvaluationStatus. - */ - public static WorkspaceEvaluationStatus fromString(String name) { - return fromString(name, WorkspaceEvaluationStatus.class); - } - - /** - * Gets known WorkspaceEvaluationStatus values. - * - * @return known WorkspaceEvaluationStatus values. - */ - public static Collection values() { - return values(WorkspaceEvaluationStatus.class); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/WorkspaceProperties.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/WorkspaceProperties.java deleted file mode 100644 index 48877233690b..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/WorkspaceProperties.java +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Model that represents the Workspace properties model. - */ -@Fluent -public final class WorkspaceProperties implements JsonSerializable { - /* - * Most recent provisioning state for the given Workspace resource. - */ - private ProvisioningState provisioningState; - - /* - * The communication endpoint used to connect and communicate with the workspace for fault-injection orchestration. - */ - private String communicationEndpoint; - - /* - * The intended workspace-level resource scope to be used by child scenarios. - */ - private List scopes; - - /** - * Creates an instance of WorkspaceProperties class. - */ - public WorkspaceProperties() { - } - - /** - * Get the provisioningState property: Most recent provisioning state for the given Workspace resource. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the communicationEndpoint property: The communication endpoint used to connect and communicate with the - * workspace for fault-injection orchestration. - * - * @return the communicationEndpoint value. - */ - public String communicationEndpoint() { - return this.communicationEndpoint; - } - - /** - * Get the scopes property: The intended workspace-level resource scope to be used by child scenarios. - * - * @return the scopes value. - */ - public List scopes() { - return this.scopes; - } - - /** - * Set the scopes property: The intended workspace-level resource scope to be used by child scenarios. - * - * @param scopes the scopes value to set. - * @return the WorkspaceProperties object itself. - */ - public WorkspaceProperties withScopes(List scopes) { - this.scopes = scopes; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("scopes", this.scopes, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of WorkspaceProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of WorkspaceProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the WorkspaceProperties. - */ - public static WorkspaceProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - WorkspaceProperties deserializedWorkspaceProperties = new WorkspaceProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("scopes".equals(fieldName)) { - List scopes = reader.readArray(reader1 -> reader1.getString()); - deserializedWorkspaceProperties.scopes = scopes; - } else if ("provisioningState".equals(fieldName)) { - deserializedWorkspaceProperties.provisioningState - = ProvisioningState.fromString(reader.getString()); - } else if ("communicationEndpoint".equals(fieldName)) { - deserializedWorkspaceProperties.communicationEndpoint = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedWorkspaceProperties; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/WorkspaceUpdate.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/WorkspaceUpdate.java deleted file mode 100644 index ee0bb5913478..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/WorkspaceUpdate.java +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Describes a workspace update. - */ -@Fluent -public final class WorkspaceUpdate implements JsonSerializable { - /* - * Resource tags. - */ - private Map tags; - - /* - * The managed service identities assigned to this resource. - */ - private ResourceIdentity identity; - - /** - * Creates an instance of WorkspaceUpdate class. - */ - public WorkspaceUpdate() { - } - - /** - * Get the tags property: Resource tags. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Resource tags. - * - * @param tags the tags value to set. - * @return the WorkspaceUpdate object itself. - */ - public WorkspaceUpdate withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the identity property: The managed service identities assigned to this resource. - * - * @return the identity value. - */ - public ResourceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: The managed service identities assigned to this resource. - * - * @param identity the identity value to set. - * @return the WorkspaceUpdate object itself. - */ - public WorkspaceUpdate withIdentity(ResourceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("identity", this.identity); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of WorkspaceUpdate from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of WorkspaceUpdate if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the WorkspaceUpdate. - */ - public static WorkspaceUpdate fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - WorkspaceUpdate deserializedWorkspaceUpdate = new WorkspaceUpdate(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedWorkspaceUpdate.tags = tags; - } else if ("identity".equals(fieldName)) { - deserializedWorkspaceUpdate.identity = ResourceIdentity.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedWorkspaceUpdate; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Workspaces.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Workspaces.java deleted file mode 100644 index 7c65b7f3a566..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/Workspaces.java +++ /dev/null @@ -1,184 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of Workspaces. - */ -public interface Workspaces { - /** - * Get a Workspace resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Workspace resource along with {@link Response}. - */ - Response getByResourceGroupWithResponse(String resourceGroupName, String workspaceName, Context context); - - /** - * Get a Workspace resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace 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 Workspace resource. - */ - Workspace getByResourceGroup(String resourceGroupName, String workspaceName); - - /** - * Delete a Workspace resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace 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. - */ - void deleteByResourceGroup(String resourceGroupName, String workspaceName); - - /** - * Delete a Workspace resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String workspaceName, Context context); - - /** - * Get a list of Workspace resources in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Workspace resources in a resource group as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Get a list of Workspace resources in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param continuationToken String that sets the continuation token. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Workspace resources in a resource group as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName, String continuationToken, Context context); - - /** - * Get a list of all Workspace 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 all Workspace resources in a subscription as paginated response with {@link PagedIterable}. - */ - PagedIterable list(); - - /** - * Get a list of all Workspace resources in a subscription. - * - * @param continuationToken String that sets the continuation token. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of all Workspace resources in a subscription as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String continuationToken, Context context); - - /** - * Refreshes recommendation status for all scenarios in a given workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - WorkspaceEvaluation refreshRecommendations(String resourceGroupName, String workspaceName); - - /** - * Refreshes recommendation status for all scenarios in a given workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName String that represents a Workspace resource name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - WorkspaceEvaluation refreshRecommendations(String resourceGroupName, String workspaceName, Context context); - - /** - * Get a Workspace 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. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Workspace resource along with {@link Response}. - */ - Workspace getById(String id); - - /** - * Get a Workspace resource. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Workspace resource along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a Workspace 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. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete a Workspace resource. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new Workspace resource. - * - * @param name resource name. - * @return the first stage of the new Workspace definition. - */ - Workspace.DefinitionStages.Blank define(String name); -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ZoneResolutionInfo.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ZoneResolutionInfo.java deleted file mode 100644 index 9e7c00e234be..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ZoneResolutionInfo.java +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Information about how physical zones were resolved to logical zones - * for each subscription during scenario execution. - */ -@Immutable -public final class ZoneResolutionInfo implements JsonSerializable { - /* - * The zone targeting mode used for this run. - * `logical` — customer specified logical zone identifiers directly. - * `physical` — customer specified physical zone identifiers; the system - * resolved them to per-subscription logical zones at execution time. - */ - private ZoneResolutionMode mode; - - /* - * The physical zone identifiers requested by the customer in the - * scenario configuration (e.g., `["westus2-az1"]`). - * Empty array when `mode` is `logical`. - */ - private List requestedPhysicalZones; - - /* - * Per-subscription zone resolution results. Each entry maps a subscription - * to the logical zone resolved from the requested physical zone. - * Empty when `mode` is `logical`. - */ - private List subscriptionZoneMappings; - - /** - * Creates an instance of ZoneResolutionInfo class. - */ - private ZoneResolutionInfo() { - } - - /** - * Get the mode property: The zone targeting mode used for this run. - * `logical` — customer specified logical zone identifiers directly. - * `physical` — customer specified physical zone identifiers; the system - * resolved them to per-subscription logical zones at execution time. - * - * @return the mode value. - */ - public ZoneResolutionMode mode() { - return this.mode; - } - - /** - * Get the requestedPhysicalZones property: The physical zone identifiers requested by the customer in the - * scenario configuration (e.g., `["westus2-az1"]`). - * Empty array when `mode` is `logical`. - * - * @return the requestedPhysicalZones value. - */ - public List requestedPhysicalZones() { - return this.requestedPhysicalZones; - } - - /** - * Get the subscriptionZoneMappings property: Per-subscription zone resolution results. Each entry maps a - * subscription - * to the logical zone resolved from the requested physical zone. - * Empty when `mode` is `logical`. - * - * @return the subscriptionZoneMappings value. - */ - public List subscriptionZoneMappings() { - return this.subscriptionZoneMappings; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ZoneResolutionInfo from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ZoneResolutionInfo if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ZoneResolutionInfo. - */ - public static ZoneResolutionInfo fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ZoneResolutionInfo deserializedZoneResolutionInfo = new ZoneResolutionInfo(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("mode".equals(fieldName)) { - deserializedZoneResolutionInfo.mode = ZoneResolutionMode.fromString(reader.getString()); - } else if ("requestedPhysicalZones".equals(fieldName)) { - List requestedPhysicalZones = reader.readArray(reader1 -> reader1.getString()); - deserializedZoneResolutionInfo.requestedPhysicalZones = requestedPhysicalZones; - } else if ("subscriptionZoneMappings".equals(fieldName)) { - List subscriptionZoneMappings - = reader.readArray(reader1 -> ZoneResolutionMapping.fromJson(reader1)); - deserializedZoneResolutionInfo.subscriptionZoneMappings = subscriptionZoneMappings; - } else { - reader.skipChildren(); - } - } - - return deserializedZoneResolutionInfo; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ZoneResolutionMapping.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ZoneResolutionMapping.java deleted file mode 100644 index 6cac64579ee5..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ZoneResolutionMapping.java +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Maps a single subscription to its physical-to-logical zone resolutions. - */ -@Immutable -public final class ZoneResolutionMapping implements JsonSerializable { - /* - * The subscription ID (e.g., `"6b052e15-03d3-4f17-b2e1-be7f07588291"`). - */ - private String subscriptionId; - - /* - * The physical-to-logical zone mappings for this subscription. - */ - private List zoneMappings; - - /** - * Creates an instance of ZoneResolutionMapping class. - */ - private ZoneResolutionMapping() { - } - - /** - * Get the subscriptionId property: The subscription ID (e.g., `"6b052e15-03d3-4f17-b2e1-be7f07588291"`). - * - * @return the subscriptionId value. - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Get the zoneMappings property: The physical-to-logical zone mappings for this subscription. - * - * @return the zoneMappings value. - */ - public List zoneMappings() { - return this.zoneMappings; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ZoneResolutionMapping from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ZoneResolutionMapping if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ZoneResolutionMapping. - */ - public static ZoneResolutionMapping fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ZoneResolutionMapping deserializedZoneResolutionMapping = new ZoneResolutionMapping(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("subscriptionId".equals(fieldName)) { - deserializedZoneResolutionMapping.subscriptionId = reader.getString(); - } else if ("zoneMappings".equals(fieldName)) { - List zoneMappings - = reader.readArray(reader1 -> PhysicalToLogicalZoneMapping.fromJson(reader1)); - deserializedZoneResolutionMapping.zoneMappings = zoneMappings; - } else { - reader.skipChildren(); - } - } - - return deserializedZoneResolutionMapping; - }); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ZoneResolutionMode.java b/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ZoneResolutionMode.java deleted file mode 100644 index 39dfe0cacc43..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/java/com/azure/resourcemanager/chaos/models/ZoneResolutionMode.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The zone resolution mode for a scenario run. - */ -public final class ZoneResolutionMode extends ExpandableStringEnum { - /** - * Logical zone mode — customer specified logical zone identifiers directly. - */ - public static final ZoneResolutionMode LOGICAL = fromString("logical"); - - /** - * Physical zone mode — system resolved physical zones to per-subscription - * logical zones at execution time. - */ - public static final ZoneResolutionMode PHYSICAL = fromString("physical"); - - /** - * Creates a new instance of ZoneResolutionMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ZoneResolutionMode() { - } - - /** - * Creates or finds a ZoneResolutionMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding ZoneResolutionMode. - */ - public static ZoneResolutionMode fromString(String name) { - return fromString(name, ZoneResolutionMode.class); - } - - /** - * Gets known ZoneResolutionMode values. - * - * @return known ZoneResolutionMode values. - */ - public static Collection values() { - return values(ZoneResolutionMode.class); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/resources/META-INF/azure-resourcemanager-chaos_metadata.json b/sdk/chaos/azure-resourcemanager-chaos/src/main/resources/META-INF/azure-resourcemanager-chaos_metadata.json index 9615a60d8e67..ae836419579b 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/resources/META-INF/azure-resourcemanager-chaos_metadata.json +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/resources/META-INF/azure-resourcemanager-chaos_metadata.json @@ -1 +1 @@ -{"flavor":"azure","apiVersions":{"Microsoft.Chaos":"2026-05-01-preview"},"crossLanguageDefinitions":{"com.azure.resourcemanager.chaos.fluent.ActionVersionsClient":"Microsoft.Chaos.ActionVersions","com.azure.resourcemanager.chaos.fluent.ActionVersionsClient.get":"Microsoft.Chaos.ActionVersions.get","com.azure.resourcemanager.chaos.fluent.ActionVersionsClient.getWithResponse":"Microsoft.Chaos.ActionVersions.get","com.azure.resourcemanager.chaos.fluent.ActionVersionsClient.list":"Microsoft.Chaos.ActionVersions.list","com.azure.resourcemanager.chaos.fluent.ActionsClient":"Microsoft.Chaos.Actions","com.azure.resourcemanager.chaos.fluent.ActionsClient.get":"Microsoft.Chaos.Actions.get","com.azure.resourcemanager.chaos.fluent.ActionsClient.getWithResponse":"Microsoft.Chaos.Actions.get","com.azure.resourcemanager.chaos.fluent.ActionsClient.list":"Microsoft.Chaos.Actions.list","com.azure.resourcemanager.chaos.fluent.CapabilitiesClient":"Microsoft.Chaos.Capabilities","com.azure.resourcemanager.chaos.fluent.CapabilitiesClient.createOrUpdate":"Microsoft.Chaos.Capabilities.createOrUpdate","com.azure.resourcemanager.chaos.fluent.CapabilitiesClient.createOrUpdateWithResponse":"Microsoft.Chaos.Capabilities.createOrUpdate","com.azure.resourcemanager.chaos.fluent.CapabilitiesClient.delete":"Microsoft.Chaos.Capabilities.delete","com.azure.resourcemanager.chaos.fluent.CapabilitiesClient.deleteWithResponse":"Microsoft.Chaos.Capabilities.delete","com.azure.resourcemanager.chaos.fluent.CapabilitiesClient.get":"Microsoft.Chaos.Capabilities.get","com.azure.resourcemanager.chaos.fluent.CapabilitiesClient.getWithResponse":"Microsoft.Chaos.Capabilities.get","com.azure.resourcemanager.chaos.fluent.CapabilitiesClient.list":"Microsoft.Chaos.Capabilities.list","com.azure.resourcemanager.chaos.fluent.CapabilityTypesClient":"Microsoft.Chaos.CapabilityTypes","com.azure.resourcemanager.chaos.fluent.CapabilityTypesClient.get":"Microsoft.Chaos.CapabilityTypes.get","com.azure.resourcemanager.chaos.fluent.CapabilityTypesClient.getWithResponse":"Microsoft.Chaos.CapabilityTypes.get","com.azure.resourcemanager.chaos.fluent.CapabilityTypesClient.list":"Microsoft.Chaos.CapabilityTypes.list","com.azure.resourcemanager.chaos.fluent.ChaosManagementClient":"Microsoft.Chaos","com.azure.resourcemanager.chaos.fluent.DiscoveredResourcesClient":"Microsoft.Chaos.DiscoveredResources","com.azure.resourcemanager.chaos.fluent.DiscoveredResourcesClient.get":"Microsoft.Chaos.DiscoveredResources.get","com.azure.resourcemanager.chaos.fluent.DiscoveredResourcesClient.getWithResponse":"Microsoft.Chaos.DiscoveredResources.get","com.azure.resourcemanager.chaos.fluent.DiscoveredResourcesClient.listByWorkspace":"Microsoft.Chaos.DiscoveredResources.listByWorkspace","com.azure.resourcemanager.chaos.fluent.ExperimentsClient":"Microsoft.Chaos.Experiments","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.beginCancel":"Microsoft.Chaos.Experiments.cancel","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.beginCreateOrUpdate":"Microsoft.Chaos.Experiments.createOrUpdate","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.beginDelete":"Microsoft.Chaos.Experiments.delete","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.beginStart":"Microsoft.Chaos.Experiments.start","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.beginUpdate":"Microsoft.Chaos.Experiments.update","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.cancel":"Microsoft.Chaos.Experiments.cancel","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.createOrUpdate":"Microsoft.Chaos.Experiments.createOrUpdate","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.delete":"Microsoft.Chaos.Experiments.delete","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.executionDetails":"Microsoft.Chaos.ExperimentExecutions.getExecutionDetails","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.executionDetailsWithResponse":"Microsoft.Chaos.ExperimentExecutions.getExecutionDetails","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.getByResourceGroup":"Microsoft.Chaos.Experiments.get","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.getByResourceGroupWithResponse":"Microsoft.Chaos.Experiments.get","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.getExecution":"Microsoft.Chaos.ExperimentExecutions.getExecution","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.getExecutionWithResponse":"Microsoft.Chaos.ExperimentExecutions.getExecution","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.list":"Microsoft.Chaos.Experiments.listAll","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.listAllExecutions":"Microsoft.Chaos.ExperimentExecutions.listAllExecutions","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.listByResourceGroup":"Microsoft.Chaos.Experiments.list","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.start":"Microsoft.Chaos.Experiments.start","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.update":"Microsoft.Chaos.Experiments.update","com.azure.resourcemanager.chaos.fluent.OperationStatusesClient":"Microsoft.Chaos.OperationStatuses","com.azure.resourcemanager.chaos.fluent.OperationStatusesClient.get":"Microsoft.Chaos.OperationStatuses.get","com.azure.resourcemanager.chaos.fluent.OperationStatusesClient.getWithResponse":"Microsoft.Chaos.OperationStatuses.get","com.azure.resourcemanager.chaos.fluent.OperationsClient":"Microsoft.Chaos.Operations","com.azure.resourcemanager.chaos.fluent.OperationsClient.list":"Azure.ResourceManager.Operations.list","com.azure.resourcemanager.chaos.fluent.PrivateAccessesClient":"Microsoft.Chaos.PrivateAccesses","com.azure.resourcemanager.chaos.fluent.PrivateAccessesClient.beginCreateOrUpdate":"Microsoft.Chaos.PrivateAccesses.createOrUpdate","com.azure.resourcemanager.chaos.fluent.PrivateAccessesClient.beginDelete":"Microsoft.Chaos.PrivateAccesses.delete","com.azure.resourcemanager.chaos.fluent.PrivateAccessesClient.beginDeleteAPrivateEndpointConnection":"Microsoft.Chaos.PrivateEndpointConnections.deleteAPrivateEndpointConnection","com.azure.resourcemanager.chaos.fluent.PrivateAccessesClient.beginUpdate":"Microsoft.Chaos.PrivateAccesses.update","com.azure.resourcemanager.chaos.fluent.PrivateAccessesClient.createOrUpdate":"Microsoft.Chaos.PrivateAccesses.createOrUpdate","com.azure.resourcemanager.chaos.fluent.PrivateAccessesClient.delete":"Microsoft.Chaos.PrivateAccesses.delete","com.azure.resourcemanager.chaos.fluent.PrivateAccessesClient.deleteAPrivateEndpointConnection":"Microsoft.Chaos.PrivateEndpointConnections.deleteAPrivateEndpointConnection","com.azure.resourcemanager.chaos.fluent.PrivateAccessesClient.getAPrivateEndpointConnection":"Microsoft.Chaos.PrivateEndpointConnections.getAPrivateEndpointConnection","com.azure.resourcemanager.chaos.fluent.PrivateAccessesClient.getAPrivateEndpointConnectionWithResponse":"Microsoft.Chaos.PrivateEndpointConnections.getAPrivateEndpointConnection","com.azure.resourcemanager.chaos.fluent.PrivateAccessesClient.getByResourceGroup":"Microsoft.Chaos.PrivateAccesses.get","com.azure.resourcemanager.chaos.fluent.PrivateAccessesClient.getByResourceGroupWithResponse":"Microsoft.Chaos.PrivateAccesses.get","com.azure.resourcemanager.chaos.fluent.PrivateAccessesClient.getPrivateLinkResources":"Microsoft.Chaos.PrivateAccesses.privateLinkResources","com.azure.resourcemanager.chaos.fluent.PrivateAccessesClient.getPrivateLinkResourcesWithResponse":"Microsoft.Chaos.PrivateAccesses.privateLinkResources","com.azure.resourcemanager.chaos.fluent.PrivateAccessesClient.list":"Microsoft.Chaos.PrivateAccesses.listAll","com.azure.resourcemanager.chaos.fluent.PrivateAccessesClient.listByResourceGroup":"Microsoft.Chaos.PrivateAccesses.list","com.azure.resourcemanager.chaos.fluent.PrivateAccessesClient.listPrivateEndpointConnections":"Microsoft.Chaos.PrivateEndpointConnections.listPrivateEndpointConnections","com.azure.resourcemanager.chaos.fluent.PrivateAccessesClient.update":"Microsoft.Chaos.PrivateAccesses.update","com.azure.resourcemanager.chaos.fluent.ScenarioConfigurationsClient":"Microsoft.Chaos.ScenarioConfigurations","com.azure.resourcemanager.chaos.fluent.ScenarioConfigurationsClient.beginCreateOrUpdate":"Microsoft.Chaos.ScenarioConfigurations.createOrUpdate","com.azure.resourcemanager.chaos.fluent.ScenarioConfigurationsClient.beginDelete":"Microsoft.Chaos.ScenarioConfigurations.delete","com.azure.resourcemanager.chaos.fluent.ScenarioConfigurationsClient.beginFixResourcePermissions":"Microsoft.Chaos.ScenarioConfigurations.fixResourcePermissions","com.azure.resourcemanager.chaos.fluent.ScenarioConfigurationsClient.beginValidate":"Microsoft.Chaos.ScenarioConfigurations.validate","com.azure.resourcemanager.chaos.fluent.ScenarioConfigurationsClient.createOrUpdate":"Microsoft.Chaos.ScenarioConfigurations.createOrUpdate","com.azure.resourcemanager.chaos.fluent.ScenarioConfigurationsClient.delete":"Microsoft.Chaos.ScenarioConfigurations.delete","com.azure.resourcemanager.chaos.fluent.ScenarioConfigurationsClient.execute":"Microsoft.Chaos.ScenarioConfigurations.execute","com.azure.resourcemanager.chaos.fluent.ScenarioConfigurationsClient.executeWithResponse":"Microsoft.Chaos.ScenarioConfigurations.execute","com.azure.resourcemanager.chaos.fluent.ScenarioConfigurationsClient.fixResourcePermissions":"Microsoft.Chaos.ScenarioConfigurations.fixResourcePermissions","com.azure.resourcemanager.chaos.fluent.ScenarioConfigurationsClient.get":"Microsoft.Chaos.ScenarioConfigurations.get","com.azure.resourcemanager.chaos.fluent.ScenarioConfigurationsClient.getWithResponse":"Microsoft.Chaos.ScenarioConfigurations.get","com.azure.resourcemanager.chaos.fluent.ScenarioConfigurationsClient.listAll":"Microsoft.Chaos.ScenarioConfigurations.listAll","com.azure.resourcemanager.chaos.fluent.ScenarioConfigurationsClient.validate":"Microsoft.Chaos.ScenarioConfigurations.validate","com.azure.resourcemanager.chaos.fluent.ScenarioRunsClient":"Microsoft.Chaos.ScenarioRuns","com.azure.resourcemanager.chaos.fluent.ScenarioRunsClient.cancel":"Microsoft.Chaos.ScenarioRuns.cancel","com.azure.resourcemanager.chaos.fluent.ScenarioRunsClient.cancelWithResponse":"Microsoft.Chaos.ScenarioRuns.cancel","com.azure.resourcemanager.chaos.fluent.ScenarioRunsClient.get":"Microsoft.Chaos.ScenarioRuns.get","com.azure.resourcemanager.chaos.fluent.ScenarioRunsClient.getWithResponse":"Microsoft.Chaos.ScenarioRuns.get","com.azure.resourcemanager.chaos.fluent.ScenarioRunsClient.listAll":"Microsoft.Chaos.ScenarioRuns.listAll","com.azure.resourcemanager.chaos.fluent.ScenariosClient":"Microsoft.Chaos.Scenarios","com.azure.resourcemanager.chaos.fluent.ScenariosClient.createOrUpdate":"Microsoft.Chaos.Scenarios.createOrUpdate","com.azure.resourcemanager.chaos.fluent.ScenariosClient.createOrUpdateWithResponse":"Microsoft.Chaos.Scenarios.createOrUpdate","com.azure.resourcemanager.chaos.fluent.ScenariosClient.delete":"Microsoft.Chaos.Scenarios.delete","com.azure.resourcemanager.chaos.fluent.ScenariosClient.deleteWithResponse":"Microsoft.Chaos.Scenarios.delete","com.azure.resourcemanager.chaos.fluent.ScenariosClient.get":"Microsoft.Chaos.Scenarios.get","com.azure.resourcemanager.chaos.fluent.ScenariosClient.getWithResponse":"Microsoft.Chaos.Scenarios.get","com.azure.resourcemanager.chaos.fluent.ScenariosClient.listAll":"Microsoft.Chaos.Scenarios.listAll","com.azure.resourcemanager.chaos.fluent.TargetTypesClient":"Microsoft.Chaos.TargetTypes","com.azure.resourcemanager.chaos.fluent.TargetTypesClient.get":"Microsoft.Chaos.TargetTypes.get","com.azure.resourcemanager.chaos.fluent.TargetTypesClient.getWithResponse":"Microsoft.Chaos.TargetTypes.get","com.azure.resourcemanager.chaos.fluent.TargetTypesClient.list":"Microsoft.Chaos.TargetTypes.list","com.azure.resourcemanager.chaos.fluent.TargetsClient":"Microsoft.Chaos.Targets","com.azure.resourcemanager.chaos.fluent.TargetsClient.createOrUpdate":"Microsoft.Chaos.Targets.createOrUpdate","com.azure.resourcemanager.chaos.fluent.TargetsClient.createOrUpdateWithResponse":"Microsoft.Chaos.Targets.createOrUpdate","com.azure.resourcemanager.chaos.fluent.TargetsClient.delete":"Microsoft.Chaos.Targets.delete","com.azure.resourcemanager.chaos.fluent.TargetsClient.deleteWithResponse":"Microsoft.Chaos.Targets.delete","com.azure.resourcemanager.chaos.fluent.TargetsClient.get":"Microsoft.Chaos.Targets.get","com.azure.resourcemanager.chaos.fluent.TargetsClient.getWithResponse":"Microsoft.Chaos.Targets.get","com.azure.resourcemanager.chaos.fluent.TargetsClient.list":"Microsoft.Chaos.Targets.list","com.azure.resourcemanager.chaos.fluent.WorkspacesClient":"Microsoft.Chaos.Workspaces","com.azure.resourcemanager.chaos.fluent.WorkspacesClient.beginCreateOrUpdate":"Microsoft.Chaos.Workspaces.createOrUpdate","com.azure.resourcemanager.chaos.fluent.WorkspacesClient.beginDelete":"Microsoft.Chaos.Workspaces.delete","com.azure.resourcemanager.chaos.fluent.WorkspacesClient.beginRefreshRecommendations":"Microsoft.Chaos.Workspaces.refreshRecommendations","com.azure.resourcemanager.chaos.fluent.WorkspacesClient.beginUpdate":"Microsoft.Chaos.Workspaces.update","com.azure.resourcemanager.chaos.fluent.WorkspacesClient.createOrUpdate":"Microsoft.Chaos.Workspaces.createOrUpdate","com.azure.resourcemanager.chaos.fluent.WorkspacesClient.delete":"Microsoft.Chaos.Workspaces.delete","com.azure.resourcemanager.chaos.fluent.WorkspacesClient.getByResourceGroup":"Microsoft.Chaos.Workspaces.get","com.azure.resourcemanager.chaos.fluent.WorkspacesClient.getByResourceGroupWithResponse":"Microsoft.Chaos.Workspaces.get","com.azure.resourcemanager.chaos.fluent.WorkspacesClient.list":"Microsoft.Chaos.Workspaces.listAll","com.azure.resourcemanager.chaos.fluent.WorkspacesClient.listByResourceGroup":"Microsoft.Chaos.Workspaces.list","com.azure.resourcemanager.chaos.fluent.WorkspacesClient.refreshRecommendations":"Microsoft.Chaos.Workspaces.refreshRecommendations","com.azure.resourcemanager.chaos.fluent.WorkspacesClient.update":"Microsoft.Chaos.Workspaces.update","com.azure.resourcemanager.chaos.fluent.models.ActionInner":"Microsoft.Chaos.Action","com.azure.resourcemanager.chaos.fluent.models.ActionProperties":"Microsoft.Chaos.ActionProperties","com.azure.resourcemanager.chaos.fluent.models.ActionVersionInner":"Microsoft.Chaos.ActionVersion","com.azure.resourcemanager.chaos.fluent.models.CapabilityInner":"Microsoft.Chaos.Capability","com.azure.resourcemanager.chaos.fluent.models.CapabilityProperties":"Microsoft.Chaos.CapabilityProperties","com.azure.resourcemanager.chaos.fluent.models.CapabilityTypeInner":"Microsoft.Chaos.CapabilityType","com.azure.resourcemanager.chaos.fluent.models.CapabilityTypeProperties":"Microsoft.Chaos.CapabilityTypeProperties","com.azure.resourcemanager.chaos.fluent.models.DiscoveredResourceInner":"Microsoft.Chaos.DiscoveredResource","com.azure.resourcemanager.chaos.fluent.models.ExperimentExecutionDetailsInner":"Microsoft.Chaos.ExperimentExecutionDetails","com.azure.resourcemanager.chaos.fluent.models.ExperimentExecutionDetailsProperties":"Microsoft.Chaos.ExperimentExecutionDetailsProperties","com.azure.resourcemanager.chaos.fluent.models.ExperimentExecutionInner":"Microsoft.Chaos.ExperimentExecution","com.azure.resourcemanager.chaos.fluent.models.ExperimentExecutionProperties":"Microsoft.Chaos.ExperimentExecutionProperties","com.azure.resourcemanager.chaos.fluent.models.ExperimentInner":"Microsoft.Chaos.Experiment","com.azure.resourcemanager.chaos.fluent.models.ExperimentProperties":"Microsoft.Chaos.ExperimentProperties","com.azure.resourcemanager.chaos.fluent.models.OperationInner":"Azure.ResourceManager.CommonTypes.Operation","com.azure.resourcemanager.chaos.fluent.models.OperationStatusInner":"Azure.ResourceManager.CommonTypes.OperationStatusResult","com.azure.resourcemanager.chaos.fluent.models.PrivateAccessInner":"Microsoft.Chaos.PrivateAccess","com.azure.resourcemanager.chaos.fluent.models.PrivateEndpointConnectionInner":"Microsoft.Chaos.PrivateEndpointConnection","com.azure.resourcemanager.chaos.fluent.models.PrivateLinkResourceListResultInner":"Microsoft.Chaos.PrivateLinkResourceListResult","com.azure.resourcemanager.chaos.fluent.models.ScenarioConfigurationInner":"Microsoft.Chaos.ScenarioConfiguration","com.azure.resourcemanager.chaos.fluent.models.ScenarioInner":"Microsoft.Chaos.Scenario","com.azure.resourcemanager.chaos.fluent.models.ScenarioRunInner":"Microsoft.Chaos.ScenarioRun","com.azure.resourcemanager.chaos.fluent.models.TargetInner":"Microsoft.Chaos.Target","com.azure.resourcemanager.chaos.fluent.models.TargetTypeInner":"Microsoft.Chaos.TargetType","com.azure.resourcemanager.chaos.fluent.models.TargetTypeProperties":"Microsoft.Chaos.TargetTypeProperties","com.azure.resourcemanager.chaos.fluent.models.WorkspaceInner":"Microsoft.Chaos.Workspace","com.azure.resourcemanager.chaos.implementation.ChaosManagementClientBuilder":"Microsoft.Chaos","com.azure.resourcemanager.chaos.implementation.models.ActionListResult":"Microsoft.Chaos.ActionListResult","com.azure.resourcemanager.chaos.implementation.models.ActionVersionListResult":"Microsoft.Chaos.ActionVersionListResult","com.azure.resourcemanager.chaos.implementation.models.CapabilityListResult":"Microsoft.Chaos.CapabilityListResult","com.azure.resourcemanager.chaos.implementation.models.CapabilityTypeListResult":"Microsoft.Chaos.CapabilityTypeListResult","com.azure.resourcemanager.chaos.implementation.models.DiscoveredResourceListResult":"Microsoft.Chaos.DiscoveredResourceListResult","com.azure.resourcemanager.chaos.implementation.models.ExperimentExecutionListResult":"Microsoft.Chaos.ExperimentExecutionListResult","com.azure.resourcemanager.chaos.implementation.models.ExperimentListResult":"Microsoft.Chaos.ExperimentListResult","com.azure.resourcemanager.chaos.implementation.models.OperationListResult":"Azure.ResourceManager.CommonTypes.OperationListResult","com.azure.resourcemanager.chaos.implementation.models.PrivateAccessListResult":"Microsoft.Chaos.PrivateAccessListResult","com.azure.resourcemanager.chaos.implementation.models.PrivateEndpointConnectionListResult":"Microsoft.Chaos.PrivateEndpointConnectionListResult","com.azure.resourcemanager.chaos.implementation.models.ScenarioConfigurationListResult":"Microsoft.Chaos.ScenarioConfigurationListResult","com.azure.resourcemanager.chaos.implementation.models.ScenarioListResult":"Microsoft.Chaos.ScenarioListResult","com.azure.resourcemanager.chaos.implementation.models.ScenarioRunListResult":"Microsoft.Chaos.ScenarioRunListResult","com.azure.resourcemanager.chaos.implementation.models.TargetListResult":"Microsoft.Chaos.TargetListResult","com.azure.resourcemanager.chaos.implementation.models.TargetTypeListResult":"Microsoft.Chaos.TargetTypeListResult","com.azure.resourcemanager.chaos.implementation.models.WorkspaceListResult":"Microsoft.Chaos.WorkspaceListResult","com.azure.resourcemanager.chaos.models.ActionDependency":"Microsoft.Chaos.ActionDependency","com.azure.resourcemanager.chaos.models.ActionDependencyType":"Microsoft.Chaos.ActionDependencyType","com.azure.resourcemanager.chaos.models.ActionKind":"Microsoft.Chaos.ActionKind","com.azure.resourcemanager.chaos.models.ActionLifecycle":"Microsoft.Chaos.ActionLifecycle","com.azure.resourcemanager.chaos.models.ActionPropertiesParametersSchema":"Microsoft.Chaos.ActionProperties.parametersSchema.anonymous","com.azure.resourcemanager.chaos.models.ActionStatus":"Microsoft.Chaos.ActionStatus","com.azure.resourcemanager.chaos.models.ActionSupportedTargetType":"Microsoft.Chaos.ActionSupportedTargetType","com.azure.resourcemanager.chaos.models.ActionType":"Azure.ResourceManager.CommonTypes.ActionType","com.azure.resourcemanager.chaos.models.BranchStatus":"Microsoft.Chaos.BranchStatus","com.azure.resourcemanager.chaos.models.CapabilityTypePropertiesRuntimeProperties":"Microsoft.Chaos.CapabilityTypePropertiesRuntimeProperties","com.azure.resourcemanager.chaos.models.ChaosExperimentAction":"Microsoft.Chaos.ChaosExperimentAction","com.azure.resourcemanager.chaos.models.ChaosExperimentBranch":"Microsoft.Chaos.ChaosExperimentBranch","com.azure.resourcemanager.chaos.models.ChaosExperimentStep":"Microsoft.Chaos.ChaosExperimentStep","com.azure.resourcemanager.chaos.models.ChaosTargetFilter":"Microsoft.Chaos.ChaosTargetFilter","com.azure.resourcemanager.chaos.models.ChaosTargetListSelector":"Microsoft.Chaos.ChaosTargetListSelector","com.azure.resourcemanager.chaos.models.ChaosTargetQuerySelector":"Microsoft.Chaos.ChaosTargetQuerySelector","com.azure.resourcemanager.chaos.models.ChaosTargetSelector":"Microsoft.Chaos.ChaosTargetSelector","com.azure.resourcemanager.chaos.models.ChaosTargetSimpleFilter":"Microsoft.Chaos.ChaosTargetSimpleFilter","com.azure.resourcemanager.chaos.models.ChaosTargetSimpleFilterParameters":"Microsoft.Chaos.ChaosTargetSimpleFilterParameters","com.azure.resourcemanager.chaos.models.ConfigurationExclusions":"Microsoft.Chaos.ConfigurationExclusions","com.azure.resourcemanager.chaos.models.ConfigurationFilters":"Microsoft.Chaos.ConfigurationFilters","com.azure.resourcemanager.chaos.models.ContinuousAction":"Microsoft.Chaos.ContinuousAction","com.azure.resourcemanager.chaos.models.CustomerDataStorageProperties":"Microsoft.Chaos.CustomerDataStorageProperties","com.azure.resourcemanager.chaos.models.DelayAction":"Microsoft.Chaos.DelayAction","com.azure.resourcemanager.chaos.models.DiscoveredResourceProperties":"Microsoft.Chaos.DiscoveredResourceProperties","com.azure.resourcemanager.chaos.models.DiscreteAction":"Microsoft.Chaos.DiscreteAction","com.azure.resourcemanager.chaos.models.EntraIdentity":"Microsoft.Chaos.EntraIdentity","com.azure.resourcemanager.chaos.models.ExperimentActionType":"Microsoft.Chaos.ExperimentActionType","com.azure.resourcemanager.chaos.models.ExperimentExecutionActionTargetDetailsError":"Microsoft.Chaos.ExperimentExecutionActionTargetDetailsError","com.azure.resourcemanager.chaos.models.ExperimentExecutionActionTargetDetailsProperties":"Microsoft.Chaos.ExperimentExecutionActionTargetDetailsProperties","com.azure.resourcemanager.chaos.models.ExperimentExecutionDetailsPropertiesRunInformation":"Microsoft.Chaos.ExperimentExecutionDetailsPropertiesRunInformation","com.azure.resourcemanager.chaos.models.ExperimentUpdate":"Microsoft.Chaos.ExperimentUpdate","com.azure.resourcemanager.chaos.models.ExternalResource":"Microsoft.Chaos.ExternalResource","com.azure.resourcemanager.chaos.models.FilterType":"Microsoft.Chaos.FilterType","com.azure.resourcemanager.chaos.models.FixResourcePermissionsRequest":"Microsoft.Chaos.FixResourcePermissionsRequest","com.azure.resourcemanager.chaos.models.KeyValuePair":"Microsoft.Chaos.KeyValuePair","com.azure.resourcemanager.chaos.models.ManagedServiceIdentityType":"Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType","com.azure.resourcemanager.chaos.models.OperationDisplay":"Azure.ResourceManager.CommonTypes.OperationDisplay","com.azure.resourcemanager.chaos.models.OperationError":"Microsoft.Chaos.OperationError","com.azure.resourcemanager.chaos.models.Origin":"Azure.ResourceManager.CommonTypes.Origin","com.azure.resourcemanager.chaos.models.ParameterType":"Microsoft.Chaos.ParameterType","com.azure.resourcemanager.chaos.models.PermissionError":"Microsoft.Chaos.PermissionError","com.azure.resourcemanager.chaos.models.PermissionsFix":"Microsoft.Chaos.PermissionsFix","com.azure.resourcemanager.chaos.models.PermissionsFixProperties":"Microsoft.Chaos.PermissionsFixProperties","com.azure.resourcemanager.chaos.models.PermissionsFixState":"Microsoft.Chaos.PermissionsFixState","com.azure.resourcemanager.chaos.models.PermissionsFixSummary":"Microsoft.Chaos.PermissionsFixSummary","com.azure.resourcemanager.chaos.models.PhysicalToLogicalZoneMapping":"Microsoft.Chaos.PhysicalToLogicalZoneMapping","com.azure.resourcemanager.chaos.models.PrivateAccessPatch":"Microsoft.Chaos.PrivateAccessPatch","com.azure.resourcemanager.chaos.models.PrivateAccessProperties":"Microsoft.Chaos.PrivateAccessProperties","com.azure.resourcemanager.chaos.models.PrivateEndpoint":"Microsoft.Chaos.PrivateEndpoint","com.azure.resourcemanager.chaos.models.PrivateEndpointConnectionProperties":"Microsoft.Chaos.PrivateEndpointConnectionProperties","com.azure.resourcemanager.chaos.models.PrivateEndpointServiceConnectionStatus":"Microsoft.Chaos.PrivateEndpointServiceConnectionStatus","com.azure.resourcemanager.chaos.models.PrivateLinkResource":"Microsoft.Chaos.PrivateLinkResource","com.azure.resourcemanager.chaos.models.PrivateLinkResourceProperties":"Microsoft.Chaos.PrivateLinkResourceProperties","com.azure.resourcemanager.chaos.models.PrivateLinkServiceConnectionState":"Microsoft.Chaos.PrivateLinkServiceConnectionState","com.azure.resourcemanager.chaos.models.ProvisioningState":"Microsoft.Chaos.ProvisioningState","com.azure.resourcemanager.chaos.models.PublicNetworkAccessOption":"Microsoft.Chaos.PublicNetworkAccessOption","com.azure.resourcemanager.chaos.models.Recommendation":"Microsoft.Chaos.Recommendation","com.azure.resourcemanager.chaos.models.RecommendationStatus":"Microsoft.Chaos.RecommendationStatus","com.azure.resourcemanager.chaos.models.ResourceIdentity":"Azure.ResourceManager.CommonTypes.ManagedServiceIdentity","com.azure.resourcemanager.chaos.models.ResourceStateError":"Microsoft.Chaos.ResourceStateError","com.azure.resourcemanager.chaos.models.RoleAssignmentError":"Microsoft.Chaos.RoleAssignmentError","com.azure.resourcemanager.chaos.models.RoleAssignmentResult":"Microsoft.Chaos.RoleAssignmentResult","com.azure.resourcemanager.chaos.models.RoleAssignmentStatus":"Microsoft.Chaos.RoleAssignmentStatus","com.azure.resourcemanager.chaos.models.RunAfter":"Microsoft.Chaos.RunAfter","com.azure.resourcemanager.chaos.models.RunAfterBehavior":"Microsoft.Chaos.RunAfterBehavior","com.azure.resourcemanager.chaos.models.ScenarioAction":"Microsoft.Chaos.ScenarioAction","com.azure.resourcemanager.chaos.models.ScenarioConfigurationProperties":"Microsoft.Chaos.ScenarioConfigurationProperties","com.azure.resourcemanager.chaos.models.ScenarioConfigurationsExecuteHeaders":null,"com.azure.resourcemanager.chaos.models.ScenarioErrors":"Microsoft.Chaos.ScenarioErrors","com.azure.resourcemanager.chaos.models.ScenarioEvaluationResultItem":"Microsoft.Chaos.ScenarioEvaluationResultItem","com.azure.resourcemanager.chaos.models.ScenarioParameter":"Microsoft.Chaos.ScenarioParameter","com.azure.resourcemanager.chaos.models.ScenarioProperties":"Microsoft.Chaos.ScenarioProperties","com.azure.resourcemanager.chaos.models.ScenarioRunProperties":"Microsoft.Chaos.ScenarioRunProperties","com.azure.resourcemanager.chaos.models.ScenarioRunResource":"Microsoft.Chaos.ScenarioRunResource","com.azure.resourcemanager.chaos.models.ScenarioRunState":"Microsoft.Chaos.ScenarioRunState","com.azure.resourcemanager.chaos.models.ScenarioRunSummaryAction":"Microsoft.Chaos.ScenarioRunSummaryAction","com.azure.resourcemanager.chaos.models.ScenarioRunsCancelHeaders":null,"com.azure.resourcemanager.chaos.models.ScenarioRunsGetHeaders":null,"com.azure.resourcemanager.chaos.models.ScenarioSummaryState":"Microsoft.Chaos.ScenarioSummaryState","com.azure.resourcemanager.chaos.models.ScenarioValidationState":"Microsoft.Chaos.ScenarioValidationState","com.azure.resourcemanager.chaos.models.SelectorType":"Microsoft.Chaos.SelectorType","com.azure.resourcemanager.chaos.models.StepStatus":"Microsoft.Chaos.StepStatus","com.azure.resourcemanager.chaos.models.TargetReference":"Microsoft.Chaos.TargetReference","com.azure.resourcemanager.chaos.models.TargetReferenceType":"Microsoft.Chaos.TargetReferenceType","com.azure.resourcemanager.chaos.models.UserAssignedIdentity":"Azure.ResourceManager.CommonTypes.UserAssignedIdentity","com.azure.resourcemanager.chaos.models.Validation":"Microsoft.Chaos.Validation","com.azure.resourcemanager.chaos.models.ValidationProperties":"Microsoft.Chaos.ValidationProperties","com.azure.resourcemanager.chaos.models.WorkspaceEvaluation":"Microsoft.Chaos.WorkspaceEvaluation","com.azure.resourcemanager.chaos.models.WorkspaceEvaluationProperties":"Microsoft.Chaos.WorkspaceEvaluationProperties","com.azure.resourcemanager.chaos.models.WorkspaceEvaluationStatus":"Microsoft.Chaos.WorkspaceEvaluationStatus","com.azure.resourcemanager.chaos.models.WorkspaceProperties":"Microsoft.Chaos.WorkspaceProperties","com.azure.resourcemanager.chaos.models.WorkspaceUpdate":"Microsoft.Chaos.WorkspaceUpdate","com.azure.resourcemanager.chaos.models.ZoneResolutionInfo":"Microsoft.Chaos.ZoneResolutionInfo","com.azure.resourcemanager.chaos.models.ZoneResolutionMapping":"Microsoft.Chaos.ZoneResolutionMapping","com.azure.resourcemanager.chaos.models.ZoneResolutionMode":"Microsoft.Chaos.ZoneResolutionMode"},"generatedFiles":["src/main/java/com/azure/resourcemanager/chaos/ChaosManager.java","src/main/java/com/azure/resourcemanager/chaos/fluent/ActionVersionsClient.java","src/main/java/com/azure/resourcemanager/chaos/fluent/ActionsClient.java","src/main/java/com/azure/resourcemanager/chaos/fluent/CapabilitiesClient.java","src/main/java/com/azure/resourcemanager/chaos/fluent/CapabilityTypesClient.java","src/main/java/com/azure/resourcemanager/chaos/fluent/ChaosManagementClient.java","src/main/java/com/azure/resourcemanager/chaos/fluent/DiscoveredResourcesClient.java","src/main/java/com/azure/resourcemanager/chaos/fluent/ExperimentsClient.java","src/main/java/com/azure/resourcemanager/chaos/fluent/OperationStatusesClient.java","src/main/java/com/azure/resourcemanager/chaos/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/chaos/fluent/PrivateAccessesClient.java","src/main/java/com/azure/resourcemanager/chaos/fluent/ScenarioConfigurationsClient.java","src/main/java/com/azure/resourcemanager/chaos/fluent/ScenarioRunsClient.java","src/main/java/com/azure/resourcemanager/chaos/fluent/ScenariosClient.java","src/main/java/com/azure/resourcemanager/chaos/fluent/TargetTypesClient.java","src/main/java/com/azure/resourcemanager/chaos/fluent/TargetsClient.java","src/main/java/com/azure/resourcemanager/chaos/fluent/WorkspacesClient.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/ActionInner.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/ActionProperties.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/ActionVersionInner.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/CapabilityInner.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/CapabilityProperties.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/CapabilityTypeInner.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/CapabilityTypeProperties.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/DiscoveredResourceInner.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentExecutionDetailsInner.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentExecutionDetailsProperties.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentExecutionInner.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentExecutionProperties.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentInner.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentProperties.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/OperationStatusInner.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/PrivateAccessInner.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/PrivateEndpointConnectionInner.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/PrivateLinkResourceListResultInner.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/ScenarioConfigurationInner.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/ScenarioInner.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/ScenarioRunInner.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/TargetInner.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/TargetTypeInner.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/TargetTypeProperties.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/WorkspaceInner.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/chaos/fluent/package-info.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ActionImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ActionVersionImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ActionVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ActionVersionsImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ActionsClientImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ActionsImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilitiesClientImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilitiesImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilityImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilityTypeImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilityTypesClientImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilityTypesImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ChaosManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ChaosManagementClientImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/DiscoveredResourceImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/DiscoveredResourcesClientImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/DiscoveredResourcesImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentExecutionDetailsImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentExecutionImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentsClientImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentsImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/OperationImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/OperationStatusImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/OperationStatusesClientImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/OperationStatusesImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/PrivateAccessImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/PrivateAccessesClientImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/PrivateAccessesImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/PrivateEndpointConnectionImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/PrivateLinkResourceListResultImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioConfigurationImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioConfigurationsClientImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioConfigurationsImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioRunImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioRunsClientImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ScenarioRunsImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ScenariosClientImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ScenariosImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/TargetImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/TargetTypeImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/TargetTypesClientImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/TargetTypesImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/TargetsClientImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/TargetsImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/WorkspaceImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/WorkspacesClientImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/WorkspacesImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/models/ActionListResult.java","src/main/java/com/azure/resourcemanager/chaos/implementation/models/ActionVersionListResult.java","src/main/java/com/azure/resourcemanager/chaos/implementation/models/CapabilityListResult.java","src/main/java/com/azure/resourcemanager/chaos/implementation/models/CapabilityTypeListResult.java","src/main/java/com/azure/resourcemanager/chaos/implementation/models/DiscoveredResourceListResult.java","src/main/java/com/azure/resourcemanager/chaos/implementation/models/ExperimentExecutionListResult.java","src/main/java/com/azure/resourcemanager/chaos/implementation/models/ExperimentListResult.java","src/main/java/com/azure/resourcemanager/chaos/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/chaos/implementation/models/PrivateAccessListResult.java","src/main/java/com/azure/resourcemanager/chaos/implementation/models/PrivateEndpointConnectionListResult.java","src/main/java/com/azure/resourcemanager/chaos/implementation/models/ScenarioConfigurationListResult.java","src/main/java/com/azure/resourcemanager/chaos/implementation/models/ScenarioListResult.java","src/main/java/com/azure/resourcemanager/chaos/implementation/models/ScenarioRunListResult.java","src/main/java/com/azure/resourcemanager/chaos/implementation/models/TargetListResult.java","src/main/java/com/azure/resourcemanager/chaos/implementation/models/TargetTypeListResult.java","src/main/java/com/azure/resourcemanager/chaos/implementation/models/WorkspaceListResult.java","src/main/java/com/azure/resourcemanager/chaos/implementation/package-info.java","src/main/java/com/azure/resourcemanager/chaos/models/Action.java","src/main/java/com/azure/resourcemanager/chaos/models/ActionDependency.java","src/main/java/com/azure/resourcemanager/chaos/models/ActionDependencyType.java","src/main/java/com/azure/resourcemanager/chaos/models/ActionKind.java","src/main/java/com/azure/resourcemanager/chaos/models/ActionLifecycle.java","src/main/java/com/azure/resourcemanager/chaos/models/ActionPropertiesParametersSchema.java","src/main/java/com/azure/resourcemanager/chaos/models/ActionStatus.java","src/main/java/com/azure/resourcemanager/chaos/models/ActionSupportedTargetType.java","src/main/java/com/azure/resourcemanager/chaos/models/ActionType.java","src/main/java/com/azure/resourcemanager/chaos/models/ActionVersion.java","src/main/java/com/azure/resourcemanager/chaos/models/ActionVersions.java","src/main/java/com/azure/resourcemanager/chaos/models/Actions.java","src/main/java/com/azure/resourcemanager/chaos/models/BranchStatus.java","src/main/java/com/azure/resourcemanager/chaos/models/Capabilities.java","src/main/java/com/azure/resourcemanager/chaos/models/Capability.java","src/main/java/com/azure/resourcemanager/chaos/models/CapabilityType.java","src/main/java/com/azure/resourcemanager/chaos/models/CapabilityTypePropertiesRuntimeProperties.java","src/main/java/com/azure/resourcemanager/chaos/models/CapabilityTypes.java","src/main/java/com/azure/resourcemanager/chaos/models/ChaosExperimentAction.java","src/main/java/com/azure/resourcemanager/chaos/models/ChaosExperimentBranch.java","src/main/java/com/azure/resourcemanager/chaos/models/ChaosExperimentStep.java","src/main/java/com/azure/resourcemanager/chaos/models/ChaosTargetFilter.java","src/main/java/com/azure/resourcemanager/chaos/models/ChaosTargetListSelector.java","src/main/java/com/azure/resourcemanager/chaos/models/ChaosTargetQuerySelector.java","src/main/java/com/azure/resourcemanager/chaos/models/ChaosTargetSelector.java","src/main/java/com/azure/resourcemanager/chaos/models/ChaosTargetSimpleFilter.java","src/main/java/com/azure/resourcemanager/chaos/models/ChaosTargetSimpleFilterParameters.java","src/main/java/com/azure/resourcemanager/chaos/models/ConfigurationExclusions.java","src/main/java/com/azure/resourcemanager/chaos/models/ConfigurationFilters.java","src/main/java/com/azure/resourcemanager/chaos/models/ContinuousAction.java","src/main/java/com/azure/resourcemanager/chaos/models/CustomerDataStorageProperties.java","src/main/java/com/azure/resourcemanager/chaos/models/DelayAction.java","src/main/java/com/azure/resourcemanager/chaos/models/DiscoveredResource.java","src/main/java/com/azure/resourcemanager/chaos/models/DiscoveredResourceProperties.java","src/main/java/com/azure/resourcemanager/chaos/models/DiscoveredResources.java","src/main/java/com/azure/resourcemanager/chaos/models/DiscreteAction.java","src/main/java/com/azure/resourcemanager/chaos/models/EntraIdentity.java","src/main/java/com/azure/resourcemanager/chaos/models/Experiment.java","src/main/java/com/azure/resourcemanager/chaos/models/ExperimentActionType.java","src/main/java/com/azure/resourcemanager/chaos/models/ExperimentExecution.java","src/main/java/com/azure/resourcemanager/chaos/models/ExperimentExecutionActionTargetDetailsError.java","src/main/java/com/azure/resourcemanager/chaos/models/ExperimentExecutionActionTargetDetailsProperties.java","src/main/java/com/azure/resourcemanager/chaos/models/ExperimentExecutionDetails.java","src/main/java/com/azure/resourcemanager/chaos/models/ExperimentExecutionDetailsPropertiesRunInformation.java","src/main/java/com/azure/resourcemanager/chaos/models/ExperimentUpdate.java","src/main/java/com/azure/resourcemanager/chaos/models/Experiments.java","src/main/java/com/azure/resourcemanager/chaos/models/ExternalResource.java","src/main/java/com/azure/resourcemanager/chaos/models/FilterType.java","src/main/java/com/azure/resourcemanager/chaos/models/FixResourcePermissionsRequest.java","src/main/java/com/azure/resourcemanager/chaos/models/KeyValuePair.java","src/main/java/com/azure/resourcemanager/chaos/models/ManagedServiceIdentityType.java","src/main/java/com/azure/resourcemanager/chaos/models/Operation.java","src/main/java/com/azure/resourcemanager/chaos/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/chaos/models/OperationError.java","src/main/java/com/azure/resourcemanager/chaos/models/OperationStatus.java","src/main/java/com/azure/resourcemanager/chaos/models/OperationStatuses.java","src/main/java/com/azure/resourcemanager/chaos/models/Operations.java","src/main/java/com/azure/resourcemanager/chaos/models/Origin.java","src/main/java/com/azure/resourcemanager/chaos/models/ParameterType.java","src/main/java/com/azure/resourcemanager/chaos/models/PermissionError.java","src/main/java/com/azure/resourcemanager/chaos/models/PermissionsFix.java","src/main/java/com/azure/resourcemanager/chaos/models/PermissionsFixProperties.java","src/main/java/com/azure/resourcemanager/chaos/models/PermissionsFixState.java","src/main/java/com/azure/resourcemanager/chaos/models/PermissionsFixSummary.java","src/main/java/com/azure/resourcemanager/chaos/models/PhysicalToLogicalZoneMapping.java","src/main/java/com/azure/resourcemanager/chaos/models/PrivateAccess.java","src/main/java/com/azure/resourcemanager/chaos/models/PrivateAccessPatch.java","src/main/java/com/azure/resourcemanager/chaos/models/PrivateAccessProperties.java","src/main/java/com/azure/resourcemanager/chaos/models/PrivateAccesses.java","src/main/java/com/azure/resourcemanager/chaos/models/PrivateEndpoint.java","src/main/java/com/azure/resourcemanager/chaos/models/PrivateEndpointConnection.java","src/main/java/com/azure/resourcemanager/chaos/models/PrivateEndpointConnectionProperties.java","src/main/java/com/azure/resourcemanager/chaos/models/PrivateEndpointServiceConnectionStatus.java","src/main/java/com/azure/resourcemanager/chaos/models/PrivateLinkResource.java","src/main/java/com/azure/resourcemanager/chaos/models/PrivateLinkResourceListResult.java","src/main/java/com/azure/resourcemanager/chaos/models/PrivateLinkResourceProperties.java","src/main/java/com/azure/resourcemanager/chaos/models/PrivateLinkServiceConnectionState.java","src/main/java/com/azure/resourcemanager/chaos/models/ProvisioningState.java","src/main/java/com/azure/resourcemanager/chaos/models/PublicNetworkAccessOption.java","src/main/java/com/azure/resourcemanager/chaos/models/Recommendation.java","src/main/java/com/azure/resourcemanager/chaos/models/RecommendationStatus.java","src/main/java/com/azure/resourcemanager/chaos/models/ResourceIdentity.java","src/main/java/com/azure/resourcemanager/chaos/models/ResourceStateError.java","src/main/java/com/azure/resourcemanager/chaos/models/RoleAssignmentError.java","src/main/java/com/azure/resourcemanager/chaos/models/RoleAssignmentResult.java","src/main/java/com/azure/resourcemanager/chaos/models/RoleAssignmentStatus.java","src/main/java/com/azure/resourcemanager/chaos/models/RunAfter.java","src/main/java/com/azure/resourcemanager/chaos/models/RunAfterBehavior.java","src/main/java/com/azure/resourcemanager/chaos/models/Scenario.java","src/main/java/com/azure/resourcemanager/chaos/models/ScenarioAction.java","src/main/java/com/azure/resourcemanager/chaos/models/ScenarioConfiguration.java","src/main/java/com/azure/resourcemanager/chaos/models/ScenarioConfigurationProperties.java","src/main/java/com/azure/resourcemanager/chaos/models/ScenarioConfigurations.java","src/main/java/com/azure/resourcemanager/chaos/models/ScenarioConfigurationsExecuteHeaders.java","src/main/java/com/azure/resourcemanager/chaos/models/ScenarioConfigurationsExecuteResponse.java","src/main/java/com/azure/resourcemanager/chaos/models/ScenarioErrors.java","src/main/java/com/azure/resourcemanager/chaos/models/ScenarioEvaluationResultItem.java","src/main/java/com/azure/resourcemanager/chaos/models/ScenarioParameter.java","src/main/java/com/azure/resourcemanager/chaos/models/ScenarioProperties.java","src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRun.java","src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunProperties.java","src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunResource.java","src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunState.java","src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunSummaryAction.java","src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRuns.java","src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunsCancelHeaders.java","src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunsCancelResponse.java","src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunsGetHeaders.java","src/main/java/com/azure/resourcemanager/chaos/models/ScenarioRunsGetResponse.java","src/main/java/com/azure/resourcemanager/chaos/models/ScenarioSummaryState.java","src/main/java/com/azure/resourcemanager/chaos/models/ScenarioValidationState.java","src/main/java/com/azure/resourcemanager/chaos/models/Scenarios.java","src/main/java/com/azure/resourcemanager/chaos/models/SelectorType.java","src/main/java/com/azure/resourcemanager/chaos/models/StepStatus.java","src/main/java/com/azure/resourcemanager/chaos/models/Target.java","src/main/java/com/azure/resourcemanager/chaos/models/TargetReference.java","src/main/java/com/azure/resourcemanager/chaos/models/TargetReferenceType.java","src/main/java/com/azure/resourcemanager/chaos/models/TargetType.java","src/main/java/com/azure/resourcemanager/chaos/models/TargetTypes.java","src/main/java/com/azure/resourcemanager/chaos/models/Targets.java","src/main/java/com/azure/resourcemanager/chaos/models/UserAssignedIdentity.java","src/main/java/com/azure/resourcemanager/chaos/models/Validation.java","src/main/java/com/azure/resourcemanager/chaos/models/ValidationProperties.java","src/main/java/com/azure/resourcemanager/chaos/models/Workspace.java","src/main/java/com/azure/resourcemanager/chaos/models/WorkspaceEvaluation.java","src/main/java/com/azure/resourcemanager/chaos/models/WorkspaceEvaluationProperties.java","src/main/java/com/azure/resourcemanager/chaos/models/WorkspaceEvaluationStatus.java","src/main/java/com/azure/resourcemanager/chaos/models/WorkspaceProperties.java","src/main/java/com/azure/resourcemanager/chaos/models/WorkspaceUpdate.java","src/main/java/com/azure/resourcemanager/chaos/models/Workspaces.java","src/main/java/com/azure/resourcemanager/chaos/models/ZoneResolutionInfo.java","src/main/java/com/azure/resourcemanager/chaos/models/ZoneResolutionMapping.java","src/main/java/com/azure/resourcemanager/chaos/models/ZoneResolutionMode.java","src/main/java/com/azure/resourcemanager/chaos/models/package-info.java","src/main/java/com/azure/resourcemanager/chaos/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file +{"flavor":"azure","apiVersions":{"Microsoft.Chaos":"2025-01-01"},"crossLanguageDefinitions":{"com.azure.resourcemanager.chaos.fluent.CapabilitiesClient":"Microsoft.Chaos.Capabilities","com.azure.resourcemanager.chaos.fluent.CapabilitiesClient.createOrUpdate":"Microsoft.Chaos.Capabilities.createOrUpdate","com.azure.resourcemanager.chaos.fluent.CapabilitiesClient.createOrUpdateWithResponse":"Microsoft.Chaos.Capabilities.createOrUpdate","com.azure.resourcemanager.chaos.fluent.CapabilitiesClient.delete":"Microsoft.Chaos.Capabilities.delete","com.azure.resourcemanager.chaos.fluent.CapabilitiesClient.deleteWithResponse":"Microsoft.Chaos.Capabilities.delete","com.azure.resourcemanager.chaos.fluent.CapabilitiesClient.get":"Microsoft.Chaos.Capabilities.get","com.azure.resourcemanager.chaos.fluent.CapabilitiesClient.getWithResponse":"Microsoft.Chaos.Capabilities.get","com.azure.resourcemanager.chaos.fluent.CapabilitiesClient.list":"Microsoft.Chaos.Capabilities.list","com.azure.resourcemanager.chaos.fluent.CapabilityTypesClient":"Microsoft.Chaos.CapabilityTypes","com.azure.resourcemanager.chaos.fluent.CapabilityTypesClient.get":"Microsoft.Chaos.CapabilityTypes.get","com.azure.resourcemanager.chaos.fluent.CapabilityTypesClient.getWithResponse":"Microsoft.Chaos.CapabilityTypes.get","com.azure.resourcemanager.chaos.fluent.CapabilityTypesClient.list":"Microsoft.Chaos.CapabilityTypes.list","com.azure.resourcemanager.chaos.fluent.ChaosManagementClient":"Microsoft.Chaos","com.azure.resourcemanager.chaos.fluent.ExperimentsClient":"Microsoft.Chaos.Experiments","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.beginCancel":"Microsoft.Chaos.Experiments.cancel","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.beginCreateOrUpdate":"Microsoft.Chaos.Experiments.createOrUpdate","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.beginDelete":"Microsoft.Chaos.Experiments.delete","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.beginStart":"Microsoft.Chaos.Experiments.start","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.beginUpdate":"Microsoft.Chaos.Experiments.update","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.cancel":"Microsoft.Chaos.Experiments.cancel","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.createOrUpdate":"Microsoft.Chaos.Experiments.createOrUpdate","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.delete":"Microsoft.Chaos.Experiments.delete","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.executionDetails":"Microsoft.Chaos.ExperimentExecutions.getExecutionDetails","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.executionDetailsWithResponse":"Microsoft.Chaos.ExperimentExecutions.getExecutionDetails","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.getByResourceGroup":"Microsoft.Chaos.Experiments.get","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.getByResourceGroupWithResponse":"Microsoft.Chaos.Experiments.get","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.getExecution":"Microsoft.Chaos.ExperimentExecutions.getExecution","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.getExecutionWithResponse":"Microsoft.Chaos.ExperimentExecutions.getExecution","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.list":"Microsoft.Chaos.Experiments.listAll","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.listAllExecutions":"Microsoft.Chaos.ExperimentExecutions.listAllExecutions","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.listByResourceGroup":"Microsoft.Chaos.Experiments.list","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.start":"Microsoft.Chaos.Experiments.start","com.azure.resourcemanager.chaos.fluent.ExperimentsClient.update":"Microsoft.Chaos.Experiments.update","com.azure.resourcemanager.chaos.fluent.OperationStatusesClient":"Microsoft.Chaos.OperationStatuses","com.azure.resourcemanager.chaos.fluent.OperationStatusesClient.get":"Microsoft.Chaos.OperationStatuses.get","com.azure.resourcemanager.chaos.fluent.OperationStatusesClient.getWithResponse":"Microsoft.Chaos.OperationStatuses.get","com.azure.resourcemanager.chaos.fluent.OperationsClient":"Microsoft.Chaos.Operations","com.azure.resourcemanager.chaos.fluent.OperationsClient.list":"Azure.ResourceManager.Operations.list","com.azure.resourcemanager.chaos.fluent.TargetTypesClient":"Microsoft.Chaos.TargetTypes","com.azure.resourcemanager.chaos.fluent.TargetTypesClient.get":"Microsoft.Chaos.TargetTypes.get","com.azure.resourcemanager.chaos.fluent.TargetTypesClient.getWithResponse":"Microsoft.Chaos.TargetTypes.get","com.azure.resourcemanager.chaos.fluent.TargetTypesClient.list":"Microsoft.Chaos.TargetTypes.list","com.azure.resourcemanager.chaos.fluent.TargetsClient":"Microsoft.Chaos.Targets","com.azure.resourcemanager.chaos.fluent.TargetsClient.createOrUpdate":"Microsoft.Chaos.Targets.createOrUpdate","com.azure.resourcemanager.chaos.fluent.TargetsClient.createOrUpdateWithResponse":"Microsoft.Chaos.Targets.createOrUpdate","com.azure.resourcemanager.chaos.fluent.TargetsClient.delete":"Microsoft.Chaos.Targets.delete","com.azure.resourcemanager.chaos.fluent.TargetsClient.deleteWithResponse":"Microsoft.Chaos.Targets.delete","com.azure.resourcemanager.chaos.fluent.TargetsClient.get":"Microsoft.Chaos.Targets.get","com.azure.resourcemanager.chaos.fluent.TargetsClient.getWithResponse":"Microsoft.Chaos.Targets.get","com.azure.resourcemanager.chaos.fluent.TargetsClient.list":"Microsoft.Chaos.Targets.list","com.azure.resourcemanager.chaos.fluent.models.CapabilityInner":"Microsoft.Chaos.Capability","com.azure.resourcemanager.chaos.fluent.models.CapabilityProperties":"Microsoft.Chaos.CapabilityProperties","com.azure.resourcemanager.chaos.fluent.models.CapabilityTypeInner":"Microsoft.Chaos.CapabilityType","com.azure.resourcemanager.chaos.fluent.models.CapabilityTypeProperties":"Microsoft.Chaos.CapabilityTypeProperties","com.azure.resourcemanager.chaos.fluent.models.ExperimentExecutionDetailsInner":"Microsoft.Chaos.ExperimentExecutionDetails","com.azure.resourcemanager.chaos.fluent.models.ExperimentExecutionDetailsProperties":"Microsoft.Chaos.ExperimentExecutionDetailsProperties","com.azure.resourcemanager.chaos.fluent.models.ExperimentExecutionInner":"Microsoft.Chaos.ExperimentExecution","com.azure.resourcemanager.chaos.fluent.models.ExperimentExecutionProperties":"Microsoft.Chaos.ExperimentExecutionProperties","com.azure.resourcemanager.chaos.fluent.models.ExperimentInner":"Microsoft.Chaos.Experiment","com.azure.resourcemanager.chaos.fluent.models.ExperimentProperties":"Microsoft.Chaos.ExperimentProperties","com.azure.resourcemanager.chaos.fluent.models.OperationInner":"Azure.ResourceManager.CommonTypes.Operation","com.azure.resourcemanager.chaos.fluent.models.OperationStatusInner":"Azure.ResourceManager.CommonTypes.OperationStatusResult","com.azure.resourcemanager.chaos.fluent.models.TargetInner":"Microsoft.Chaos.Target","com.azure.resourcemanager.chaos.fluent.models.TargetTypeInner":"Microsoft.Chaos.TargetType","com.azure.resourcemanager.chaos.fluent.models.TargetTypeProperties":"Microsoft.Chaos.TargetTypeProperties","com.azure.resourcemanager.chaos.implementation.ChaosManagementClientBuilder":"Microsoft.Chaos","com.azure.resourcemanager.chaos.implementation.models.CapabilityListResult":"Microsoft.Chaos.CapabilityListResult","com.azure.resourcemanager.chaos.implementation.models.CapabilityTypeListResult":"Microsoft.Chaos.CapabilityTypeListResult","com.azure.resourcemanager.chaos.implementation.models.ExperimentExecutionListResult":"Microsoft.Chaos.ExperimentExecutionListResult","com.azure.resourcemanager.chaos.implementation.models.ExperimentListResult":"Microsoft.Chaos.ExperimentListResult","com.azure.resourcemanager.chaos.implementation.models.OperationListResult":"Azure.ResourceManager.CommonTypes.OperationListResult","com.azure.resourcemanager.chaos.implementation.models.TargetListResult":"Microsoft.Chaos.TargetListResult","com.azure.resourcemanager.chaos.implementation.models.TargetTypeListResult":"Microsoft.Chaos.TargetTypeListResult","com.azure.resourcemanager.chaos.models.ActionStatus":"Microsoft.Chaos.ActionStatus","com.azure.resourcemanager.chaos.models.ActionType":"Azure.ResourceManager.CommonTypes.ActionType","com.azure.resourcemanager.chaos.models.BranchStatus":"Microsoft.Chaos.BranchStatus","com.azure.resourcemanager.chaos.models.CapabilityTypePropertiesRuntimeProperties":"Microsoft.Chaos.CapabilityTypePropertiesRuntimeProperties","com.azure.resourcemanager.chaos.models.ChaosExperimentAction":"Microsoft.Chaos.ChaosExperimentAction","com.azure.resourcemanager.chaos.models.ChaosExperimentBranch":"Microsoft.Chaos.ChaosExperimentBranch","com.azure.resourcemanager.chaos.models.ChaosExperimentStep":"Microsoft.Chaos.ChaosExperimentStep","com.azure.resourcemanager.chaos.models.ChaosTargetFilter":"Microsoft.Chaos.ChaosTargetFilter","com.azure.resourcemanager.chaos.models.ChaosTargetListSelector":"Microsoft.Chaos.ChaosTargetListSelector","com.azure.resourcemanager.chaos.models.ChaosTargetQuerySelector":"Microsoft.Chaos.ChaosTargetQuerySelector","com.azure.resourcemanager.chaos.models.ChaosTargetSelector":"Microsoft.Chaos.ChaosTargetSelector","com.azure.resourcemanager.chaos.models.ChaosTargetSimpleFilter":"Microsoft.Chaos.ChaosTargetSimpleFilter","com.azure.resourcemanager.chaos.models.ChaosTargetSimpleFilterParameters":"Microsoft.Chaos.ChaosTargetSimpleFilterParameters","com.azure.resourcemanager.chaos.models.ContinuousAction":"Microsoft.Chaos.ContinuousAction","com.azure.resourcemanager.chaos.models.DelayAction":"Microsoft.Chaos.DelayAction","com.azure.resourcemanager.chaos.models.DiscreteAction":"Microsoft.Chaos.DiscreteAction","com.azure.resourcemanager.chaos.models.ExperimentActionType":"Microsoft.Chaos.ExperimentActionType","com.azure.resourcemanager.chaos.models.ExperimentExecutionActionTargetDetailsError":"Microsoft.Chaos.ExperimentExecutionActionTargetDetailsError","com.azure.resourcemanager.chaos.models.ExperimentExecutionActionTargetDetailsProperties":"Microsoft.Chaos.ExperimentExecutionActionTargetDetailsProperties","com.azure.resourcemanager.chaos.models.ExperimentExecutionDetailsPropertiesRunInformation":"Microsoft.Chaos.ExperimentExecutionDetailsPropertiesRunInformation","com.azure.resourcemanager.chaos.models.ExperimentUpdate":"Microsoft.Chaos.ExperimentUpdate","com.azure.resourcemanager.chaos.models.FilterType":"Microsoft.Chaos.FilterType","com.azure.resourcemanager.chaos.models.KeyValuePair":"Microsoft.Chaos.KeyValuePair","com.azure.resourcemanager.chaos.models.ManagedServiceIdentityType":"Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType","com.azure.resourcemanager.chaos.models.OperationDisplay":"Azure.ResourceManager.CommonTypes.OperationDisplay","com.azure.resourcemanager.chaos.models.Origin":"Azure.ResourceManager.CommonTypes.Origin","com.azure.resourcemanager.chaos.models.ProvisioningState":"Microsoft.Chaos.ProvisioningState","com.azure.resourcemanager.chaos.models.ResourceIdentity":"Azure.ResourceManager.CommonTypes.ManagedServiceIdentity","com.azure.resourcemanager.chaos.models.SelectorType":"Microsoft.Chaos.SelectorType","com.azure.resourcemanager.chaos.models.StepStatus":"Microsoft.Chaos.StepStatus","com.azure.resourcemanager.chaos.models.TargetReference":"Microsoft.Chaos.TargetReference","com.azure.resourcemanager.chaos.models.TargetReferenceType":"Microsoft.Chaos.TargetReferenceType","com.azure.resourcemanager.chaos.models.UserAssignedIdentity":"Azure.ResourceManager.CommonTypes.UserAssignedIdentity"},"generatedFiles":["src/main/java/com/azure/resourcemanager/chaos/ChaosManager.java","src/main/java/com/azure/resourcemanager/chaos/fluent/CapabilitiesClient.java","src/main/java/com/azure/resourcemanager/chaos/fluent/CapabilityTypesClient.java","src/main/java/com/azure/resourcemanager/chaos/fluent/ChaosManagementClient.java","src/main/java/com/azure/resourcemanager/chaos/fluent/ExperimentsClient.java","src/main/java/com/azure/resourcemanager/chaos/fluent/OperationStatusesClient.java","src/main/java/com/azure/resourcemanager/chaos/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/chaos/fluent/TargetTypesClient.java","src/main/java/com/azure/resourcemanager/chaos/fluent/TargetsClient.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/CapabilityInner.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/CapabilityProperties.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/CapabilityTypeInner.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/CapabilityTypeProperties.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentExecutionDetailsInner.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentExecutionDetailsProperties.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentExecutionInner.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentExecutionProperties.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentInner.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/ExperimentProperties.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/OperationStatusInner.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/TargetInner.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/TargetTypeInner.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/TargetTypeProperties.java","src/main/java/com/azure/resourcemanager/chaos/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/chaos/fluent/package-info.java","src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilitiesClientImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilitiesImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilityImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilityTypeImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilityTypesClientImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/CapabilityTypesImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ChaosManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ChaosManagementClientImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentExecutionDetailsImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentExecutionImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentsClientImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ExperimentsImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/OperationImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/OperationStatusImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/OperationStatusesClientImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/OperationStatusesImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/chaos/implementation/TargetImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/TargetTypeImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/TargetTypesClientImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/TargetTypesImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/TargetsClientImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/TargetsImpl.java","src/main/java/com/azure/resourcemanager/chaos/implementation/models/CapabilityListResult.java","src/main/java/com/azure/resourcemanager/chaos/implementation/models/CapabilityTypeListResult.java","src/main/java/com/azure/resourcemanager/chaos/implementation/models/ExperimentExecutionListResult.java","src/main/java/com/azure/resourcemanager/chaos/implementation/models/ExperimentListResult.java","src/main/java/com/azure/resourcemanager/chaos/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/chaos/implementation/models/TargetListResult.java","src/main/java/com/azure/resourcemanager/chaos/implementation/models/TargetTypeListResult.java","src/main/java/com/azure/resourcemanager/chaos/implementation/package-info.java","src/main/java/com/azure/resourcemanager/chaos/models/ActionStatus.java","src/main/java/com/azure/resourcemanager/chaos/models/ActionType.java","src/main/java/com/azure/resourcemanager/chaos/models/BranchStatus.java","src/main/java/com/azure/resourcemanager/chaos/models/Capabilities.java","src/main/java/com/azure/resourcemanager/chaos/models/Capability.java","src/main/java/com/azure/resourcemanager/chaos/models/CapabilityType.java","src/main/java/com/azure/resourcemanager/chaos/models/CapabilityTypePropertiesRuntimeProperties.java","src/main/java/com/azure/resourcemanager/chaos/models/CapabilityTypes.java","src/main/java/com/azure/resourcemanager/chaos/models/ChaosExperimentAction.java","src/main/java/com/azure/resourcemanager/chaos/models/ChaosExperimentBranch.java","src/main/java/com/azure/resourcemanager/chaos/models/ChaosExperimentStep.java","src/main/java/com/azure/resourcemanager/chaos/models/ChaosTargetFilter.java","src/main/java/com/azure/resourcemanager/chaos/models/ChaosTargetListSelector.java","src/main/java/com/azure/resourcemanager/chaos/models/ChaosTargetQuerySelector.java","src/main/java/com/azure/resourcemanager/chaos/models/ChaosTargetSelector.java","src/main/java/com/azure/resourcemanager/chaos/models/ChaosTargetSimpleFilter.java","src/main/java/com/azure/resourcemanager/chaos/models/ChaosTargetSimpleFilterParameters.java","src/main/java/com/azure/resourcemanager/chaos/models/ContinuousAction.java","src/main/java/com/azure/resourcemanager/chaos/models/DelayAction.java","src/main/java/com/azure/resourcemanager/chaos/models/DiscreteAction.java","src/main/java/com/azure/resourcemanager/chaos/models/Experiment.java","src/main/java/com/azure/resourcemanager/chaos/models/ExperimentActionType.java","src/main/java/com/azure/resourcemanager/chaos/models/ExperimentExecution.java","src/main/java/com/azure/resourcemanager/chaos/models/ExperimentExecutionActionTargetDetailsError.java","src/main/java/com/azure/resourcemanager/chaos/models/ExperimentExecutionActionTargetDetailsProperties.java","src/main/java/com/azure/resourcemanager/chaos/models/ExperimentExecutionDetails.java","src/main/java/com/azure/resourcemanager/chaos/models/ExperimentExecutionDetailsPropertiesRunInformation.java","src/main/java/com/azure/resourcemanager/chaos/models/ExperimentUpdate.java","src/main/java/com/azure/resourcemanager/chaos/models/Experiments.java","src/main/java/com/azure/resourcemanager/chaos/models/FilterType.java","src/main/java/com/azure/resourcemanager/chaos/models/KeyValuePair.java","src/main/java/com/azure/resourcemanager/chaos/models/ManagedServiceIdentityType.java","src/main/java/com/azure/resourcemanager/chaos/models/Operation.java","src/main/java/com/azure/resourcemanager/chaos/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/chaos/models/OperationStatus.java","src/main/java/com/azure/resourcemanager/chaos/models/OperationStatuses.java","src/main/java/com/azure/resourcemanager/chaos/models/Operations.java","src/main/java/com/azure/resourcemanager/chaos/models/Origin.java","src/main/java/com/azure/resourcemanager/chaos/models/ProvisioningState.java","src/main/java/com/azure/resourcemanager/chaos/models/ResourceIdentity.java","src/main/java/com/azure/resourcemanager/chaos/models/SelectorType.java","src/main/java/com/azure/resourcemanager/chaos/models/StepStatus.java","src/main/java/com/azure/resourcemanager/chaos/models/Target.java","src/main/java/com/azure/resourcemanager/chaos/models/TargetReference.java","src/main/java/com/azure/resourcemanager/chaos/models/TargetReferenceType.java","src/main/java/com/azure/resourcemanager/chaos/models/TargetType.java","src/main/java/com/azure/resourcemanager/chaos/models/TargetTypes.java","src/main/java/com/azure/resourcemanager/chaos/models/Targets.java","src/main/java/com/azure/resourcemanager/chaos/models/UserAssignedIdentity.java","src/main/java/com/azure/resourcemanager/chaos/models/package-info.java","src/main/java/com/azure/resourcemanager/chaos/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-chaos/proxy-config.json b/sdk/chaos/azure-resourcemanager-chaos/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-chaos/proxy-config.json index 3c5a34dbd78f..0a68244d3b7c 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-chaos/proxy-config.json +++ b/sdk/chaos/azure-resourcemanager-chaos/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-chaos/proxy-config.json @@ -1 +1 @@ -[["com.azure.resourcemanager.chaos.implementation.ActionVersionsClientImpl$ActionVersionsService"],["com.azure.resourcemanager.chaos.implementation.ActionsClientImpl$ActionsService"],["com.azure.resourcemanager.chaos.implementation.CapabilitiesClientImpl$CapabilitiesService"],["com.azure.resourcemanager.chaos.implementation.CapabilityTypesClientImpl$CapabilityTypesService"],["com.azure.resourcemanager.chaos.implementation.DiscoveredResourcesClientImpl$DiscoveredResourcesService"],["com.azure.resourcemanager.chaos.implementation.ExperimentsClientImpl$ExperimentsService"],["com.azure.resourcemanager.chaos.implementation.OperationStatusesClientImpl$OperationStatusesService"],["com.azure.resourcemanager.chaos.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.chaos.implementation.PrivateAccessesClientImpl$PrivateAccessesService"],["com.azure.resourcemanager.chaos.implementation.ScenarioConfigurationsClientImpl$ScenarioConfigurationsService"],["com.azure.resourcemanager.chaos.implementation.ScenarioRunsClientImpl$ScenarioRunsService"],["com.azure.resourcemanager.chaos.implementation.ScenariosClientImpl$ScenariosService"],["com.azure.resourcemanager.chaos.implementation.TargetTypesClientImpl$TargetTypesService"],["com.azure.resourcemanager.chaos.implementation.TargetsClientImpl$TargetsService"],["com.azure.resourcemanager.chaos.implementation.WorkspacesClientImpl$WorkspacesService"]] \ No newline at end of file +[["com.azure.resourcemanager.chaos.implementation.CapabilitiesClientImpl$CapabilitiesService"],["com.azure.resourcemanager.chaos.implementation.CapabilityTypesClientImpl$CapabilityTypesService"],["com.azure.resourcemanager.chaos.implementation.ExperimentsClientImpl$ExperimentsService"],["com.azure.resourcemanager.chaos.implementation.OperationStatusesClientImpl$OperationStatusesService"],["com.azure.resourcemanager.chaos.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.chaos.implementation.TargetTypesClientImpl$TargetTypesService"],["com.azure.resourcemanager.chaos.implementation.TargetsClientImpl$TargetsService"]] \ No newline at end of file diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ActionVersionsGetSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ActionVersionsGetSamples.java deleted file mode 100644 index 1a37a7620905..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ActionVersionsGetSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -/** - * Samples for ActionVersions Get. - */ -public final class ActionVersionsGetSamples { - /* - * x-ms-original-file: 2026-05-01-preview/ActionVersions_Get.json - */ - /** - * Sample code: Get an Action Version for westus2 location. - * - * @param manager Entry point to ChaosManager. - */ - public static void getAnActionVersionForWestus2Location(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.actionVersions() - .getWithResponse("westus2", "microsoft-compute-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/ActionVersionsListSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ActionVersionsListSamples.java deleted file mode 100644 index 5144a45ecfd3..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ActionVersionsListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -/** - * Samples for ActionVersions List. - */ -public final class ActionVersionsListSamples { - /* - * x-ms-original-file: 2026-05-01-preview/ActionVersions_List.json - */ - /** - * Sample code: List all Action Versions for a given action. - * - * @param manager Entry point to ChaosManager. - */ - public static void listAllActionVersionsForAGivenAction(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.actionVersions().list("westus2", "microsoft-compute-shutdown", null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ActionsGetSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ActionsGetSamples.java deleted file mode 100644 index 267946035a1d..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ActionsGetSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -/** - * Samples for Actions Get. - */ -public final class ActionsGetSamples { - /* - * x-ms-original-file: 2026-05-01-preview/Actions_Get.json - */ - /** - * Sample code: Get an Action for westus2 location. - * - * @param manager Entry point to ChaosManager. - */ - public static void getAnActionForWestus2Location(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.actions().getWithResponse("westus2", "microsoft-compute-shutdown", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ActionsListSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ActionsListSamples.java deleted file mode 100644 index 233b3c91e27c..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ActionsListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -/** - * Samples for Actions List. - */ -public final class ActionsListSamples { - /* - * x-ms-original-file: 2026-05-01-preview/Actions_List.json - */ - /** - * Sample code: List all Actions for westus2 location. - * - * @param manager Entry point to ChaosManager. - */ - public static void listAllActionsForWestus2Location(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.actions().list("westus2", null, com.azure.core.util.Context.NONE); - } -} 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 1690136fd316..a1181e930962 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 @@ -11,7 +11,7 @@ */ public final class CapabilitiesCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-05-01-preview/Capabilities_CreateOrUpdate.json + * x-ms-original-file: 2025-01-01/Capabilities_CreateOrUpdate.json */ /** * Sample code: Create/update a Capability that extends a virtual machine Target resource. 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 bbac6dd640af..50597826bcd8 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 @@ -9,7 +9,7 @@ */ public final class CapabilitiesDeleteSamples { /* - * x-ms-original-file: 2026-05-01-preview/Capabilities_Delete.json + * x-ms-original-file: 2025-01-01/Capabilities_Delete.json */ /** * Sample code: Delete a Capability that extends a virtual machine Target resource. 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 2102c5e41d20..e9fdadb334bd 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 @@ -9,7 +9,7 @@ */ public final class CapabilitiesGetSamples { /* - * x-ms-original-file: 2026-05-01-preview/Capabilities_Get.json + * x-ms-original-file: 2025-01-01/Capabilities_Get.json */ /** * Sample code: Get a Capability that extends a virtual machine Target resource. 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 5ed344cf9ad2..9e339b72e5f1 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 @@ -9,7 +9,7 @@ */ public final class CapabilitiesListSamples { /* - * x-ms-original-file: 2026-05-01-preview/Capabilities_List.json + * x-ms-original-file: 2025-01-01/Capabilities_List.json */ /** * Sample code: List all Capabilities that extend a virtual machine Target resource. 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 d0a4a487abfa..e27921ed14ef 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 @@ -9,7 +9,7 @@ */ public final class CapabilityTypesGetSamples { /* - * x-ms-original-file: 2026-05-01-preview/CapabilityTypes_Get.json + * x-ms-original-file: 2025-01-01/CapabilityTypes_Get.json */ /** * Sample code: Get a Capability Type for a virtual machine Target resource on westus2 location. 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 428424a5dfaf..535ecddb4b5a 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 @@ -9,7 +9,7 @@ */ public final class CapabilityTypesListSamples { /* - * x-ms-original-file: 2026-05-01-preview/CapabilityTypes_List.json + * x-ms-original-file: 2025-01-01/CapabilityTypes_List.json */ /** * Sample code: List all Capability Types for a virtual machine Target resource on westus2 location. diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/DiscoveredResourcesGetSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/DiscoveredResourcesGetSamples.java deleted file mode 100644 index f82a1c65d955..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/DiscoveredResourcesGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -/** - * Samples for DiscoveredResources Get. - */ -public final class DiscoveredResourcesGetSamples { - /* - * x-ms-original-file: 2026-05-01-preview/DiscoveredResources_Get.json - */ - /** - * Sample code: Get a discovered resource. - * - * @param manager Entry point to ChaosManager. - */ - public static void getADiscoveredResource(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.discoveredResources() - .getWithResponse("exampleRG", "exampleWorkspace", "a1b2c3d4-e5f6-7890-abcd-ef1234567890", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/DiscoveredResourcesListByWorkspaceSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/DiscoveredResourcesListByWorkspaceSamples.java deleted file mode 100644 index a2803357b655..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/DiscoveredResourcesListByWorkspaceSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -/** - * Samples for DiscoveredResources ListByWorkspace. - */ -public final class DiscoveredResourcesListByWorkspaceSamples { - /* - * x-ms-original-file: 2026-05-01-preview/DiscoveredResources_ListByWorkspace.json - */ - /** - * Sample code: Get a list of discovered resources for a workspace. - * - * @param manager Entry point to ChaosManager. - */ - public static void - getAListOfDiscoveredResourcesForAWorkspace(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.discoveredResources() - .listByWorkspace("exampleRG", "exampleWorkspace", com.azure.core.util.Context.NONE); - } -} 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 377d237912e8..b04013d63791 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 @@ -9,7 +9,7 @@ */ public final class ExperimentsCancelSamples { /* - * x-ms-original-file: 2026-05-01-preview/Experiments_Cancel.json + * x-ms-original-file: 2025-01-01/Experiments_Cancel.json */ /** * Sample code: Cancel a running Experiment. 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 bce2bb9ca52f..0ec0d68c734b 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 @@ -8,7 +8,6 @@ import com.azure.resourcemanager.chaos.models.ChaosExperimentStep; import com.azure.resourcemanager.chaos.models.ChaosTargetListSelector; import com.azure.resourcemanager.chaos.models.ContinuousAction; -import com.azure.resourcemanager.chaos.models.CustomerDataStorageProperties; import com.azure.resourcemanager.chaos.models.KeyValuePair; import com.azure.resourcemanager.chaos.models.ManagedServiceIdentityType; import com.azure.resourcemanager.chaos.models.ResourceIdentity; @@ -24,7 +23,7 @@ */ public final class ExperimentsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-05-01-preview/Experiments_CreateOrUpdate.json + * x-ms-original-file: 2025-01-01/Experiments_CreateOrUpdate.json */ /** * Sample code: Create/update a Experiment in a resource group. @@ -51,9 +50,6 @@ public static void createUpdateAExperimentInAResourceGroup(com.azure.resourceman "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/exampleVM/providers/Microsoft.Chaos/targets/Microsoft-VirtualMachine"))))) .withTags(mapOf("key7131", "fakeTokenPlaceholder", "key2138", "fakeTokenPlaceholder")) .withIdentity(new ResourceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED)) - .withCustomerDataStorage(new CustomerDataStorageProperties().withStorageAccountResourceId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/exampleRG/providers/Microsoft.Storage/storageAccounts/exampleStorage") - .withBlobContainerName("azurechaosstudioexperiments")) .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 d17a0def9874..35dbd813091a 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 @@ -9,7 +9,7 @@ */ public final class ExperimentsDeleteSamples { /* - * x-ms-original-file: 2026-05-01-preview/Experiments_Delete.json + * x-ms-original-file: 2025-01-01/Experiments_Delete.json */ /** * Sample code: Delete a Experiment in a resource group. 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 e789b9a3ebf1..97108c1a4a0b 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 @@ -9,7 +9,7 @@ */ public final class ExperimentsExecutionDetailsSamples { /* - * x-ms-original-file: 2026-05-01-preview/Experiments_ExecutionDetails.json + * x-ms-original-file: 2025-01-01/Experiments_ExecutionDetails.json */ /** * Sample code: Get experiment execution details. 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 b4edacd8f7d2..1e982a836e32 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 @@ -9,7 +9,7 @@ */ public final class ExperimentsGetByResourceGroupSamples { /* - * x-ms-original-file: 2026-05-01-preview/Experiments_Get.json + * x-ms-original-file: 2025-01-01/Experiments_Get.json */ /** * Sample code: Get a Experiment in a resource group. 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 730190a2040d..edda21944a1f 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 @@ -9,7 +9,7 @@ */ public final class ExperimentsGetExecutionSamples { /* - * x-ms-original-file: 2026-05-01-preview/Experiments_GetExecution.json + * x-ms-original-file: 2025-01-01/Experiments_GetExecution.json */ /** * Sample code: Get the execution of a Experiment. 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 f96690645d15..972d5c0f0135 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 @@ -9,7 +9,7 @@ */ public final class ExperimentsListAllExecutionsSamples { /* - * x-ms-original-file: 2026-05-01-preview/Experiments_ListAllExecutions.json + * x-ms-original-file: 2025-01-01/Experiments_ListAllExecutions.json */ /** * Sample code: List all executions of an Experiment. 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 c884b66fc4c8..4dbdc25b1bb5 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 @@ -9,7 +9,7 @@ */ public final class ExperimentsListByResourceGroupSamples { /* - * x-ms-original-file: 2026-05-01-preview/Experiments_List.json + * x-ms-original-file: 2025-01-01/Experiments_List.json */ /** * Sample code: List all Experiments in a resource group. 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 2d8a934be0a6..e9eb0c30893f 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 @@ -9,7 +9,7 @@ */ public final class ExperimentsListSamples { /* - * x-ms-original-file: 2026-05-01-preview/Experiments_ListAll.json + * x-ms-original-file: 2025-01-01/Experiments_ListAll.json */ /** * Sample code: List all Experiments in a subscription. 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 afc266ebf664..43d0536d261c 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 @@ -9,7 +9,7 @@ */ public final class ExperimentsStartSamples { /* - * x-ms-original-file: 2026-05-01-preview/Experiments_Start.json + * x-ms-original-file: 2025-01-01/Experiments_Start.json */ /** * Sample code: Start a Experiment. 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 ebc5bfcfddf5..8dadd55715b0 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 @@ -16,7 +16,7 @@ */ public final class ExperimentsUpdateSamples { /* - * x-ms-original-file: 2026-05-01-preview/Experiments_Update.json + * x-ms-original-file: 2025-01-01/Experiments_Update.json */ /** * Sample code: Update an Experiment in a resource group. 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 0bc42a175e7a..b9aefa962c6b 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 @@ -9,7 +9,7 @@ */ public final class OperationStatusesGetSamples { /* - * x-ms-original-file: 2026-05-01-preview/OperationStatuses_Get.json + * x-ms-original-file: 2025-01-01/OperationStatuses_Get.json */ /** * Sample code: Gets Chaos Studio async operation status. diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesCreateOrUpdateSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesCreateOrUpdateSamples.java deleted file mode 100644 index 82639e35b9c6..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesCreateOrUpdateSamples.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.resourcemanager.chaos.models.PrivateAccessProperties; -import com.azure.resourcemanager.chaos.models.PublicNetworkAccessOption; - -/** - * Samples for PrivateAccesses CreateOrUpdate. - */ -public final class PrivateAccessesCreateOrUpdateSamples { - /* - * x-ms-original-file: - * 2026-05-01-preview/PrivateAccesses_CreateOrUpdate_Create_Or_Update_A_Private_Access_Resource.json - */ - /** - * Sample code: Create or Update a private access resource. - * - * @param manager Entry point to ChaosManager. - */ - public static void createOrUpdateAPrivateAccessResource(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.privateAccesses() - .define("myPrivateAccess") - .withRegion("centraluseuap") - .withExistingResourceGroup("myResourceGroup") - .withProperties(new PrivateAccessProperties()) - .create(); - } - - /* - * x-ms-original-file: 2026-05-01-preview/ - * PrivateAccesses_CreateOrUpdate_Create_Or_Update_A_Private_Access_Resource_With_Public_Network_Access.json - */ - /** - * Sample code: Create or Update a private access resource with publicNetworkAccess. - * - * @param manager Entry point to ChaosManager. - */ - public static void createOrUpdateAPrivateAccessResourceWithPublicNetworkAccess( - com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.privateAccesses() - .define("myPrivateAccess") - .withRegion("centraluseuap") - .withExistingResourceGroup("myResourceGroup") - .withProperties(new PrivateAccessProperties().withPublicNetworkAccess(PublicNetworkAccessOption.ENABLED)) - .create(); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesDeleteAPrivateEndpointConnectionSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesDeleteAPrivateEndpointConnectionSamples.java deleted file mode 100644 index f5e8b815fe0f..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesDeleteAPrivateEndpointConnectionSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -/** - * Samples for PrivateAccesses DeleteAPrivateEndpointConnection. - */ -public final class PrivateAccessesDeleteAPrivateEndpointConnectionSamples { - /* - * x-ms-original-file: 2026-05-01-preview/PrivateAccesses_DeleteAPrivateEndpointConnection.json - */ - /** - * Sample code: Delete a private endpoint connection under a private access resource. - * - * @param manager Entry point to ChaosManager. - */ - public static void deleteAPrivateEndpointConnectionUnderAPrivateAccessResource( - com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.privateAccesses() - .deleteAPrivateEndpointConnection("myResourceGroup", "myPrivateAccess", "myPrivateEndpointConnection", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesDeleteSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesDeleteSamples.java deleted file mode 100644 index 7af66866c2ea..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesDeleteSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -/** - * Samples for PrivateAccesses Delete. - */ -public final class PrivateAccessesDeleteSamples { - /* - * x-ms-original-file: 2026-05-01-preview/PrivateAccesses_Delete.json - */ - /** - * Sample code: Delete a private access resource. - * - * @param manager Entry point to ChaosManager. - */ - public static void deleteAPrivateAccessResource(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.privateAccesses().delete("myResourceGroup", "myPrivateAccess", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesGetAPrivateEndpointConnectionSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesGetAPrivateEndpointConnectionSamples.java deleted file mode 100644 index ee4e35c0a8ac..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesGetAPrivateEndpointConnectionSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -/** - * Samples for PrivateAccesses GetAPrivateEndpointConnection. - */ -public final class PrivateAccessesGetAPrivateEndpointConnectionSamples { - /* - * x-ms-original-file: 2026-05-01-preview/PrivateAccesses_GetAPrivateEndpointConnection.json - */ - /** - * Sample code: Get information about a private endpoint connection under a private access resource. - * - * @param manager Entry point to ChaosManager. - */ - public static void getInformationAboutAPrivateEndpointConnectionUnderAPrivateAccessResource( - com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.privateAccesses() - .getAPrivateEndpointConnectionWithResponse("myResourceGroup", "myPrivateAccess", - "myPrivateEndpointConnection", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesGetByResourceGroupSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesGetByResourceGroupSamples.java deleted file mode 100644 index 67139b3a693c..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesGetByResourceGroupSamples.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -/** - * Samples for PrivateAccesses GetByResourceGroup. - */ -public final class PrivateAccessesGetByResourceGroupSamples { - /* - * x-ms-original-file: 2026-05-01-preview/PrivateAccesses_Get_Get_A_Private_Access_Resource.json - */ - /** - * Sample code: Get a private access resource. - * - * @param manager Entry point to ChaosManager. - */ - public static void getAPrivateAccessResource(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.privateAccesses() - .getByResourceGroupWithResponse("myResourceGroup", "myPrivateAccess", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * 2026-05-01-preview/PrivateAccesses_Get_Get_A_Private_Access_Resource_With_Private_Endpoint.json - */ - /** - * Sample code: Get a private access resource with private endpoint. - * - * @param manager Entry point to ChaosManager. - */ - public static void - getAPrivateAccessResourceWithPrivateEndpoint(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.privateAccesses() - .getByResourceGroupWithResponse("myResourceGroup", "myPrivateAccess", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesGetPrivateLinkResourcesSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesGetPrivateLinkResourcesSamples.java deleted file mode 100644 index 80e55d97afcd..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesGetPrivateLinkResourcesSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -/** - * Samples for PrivateAccesses GetPrivateLinkResources. - */ -public final class PrivateAccessesGetPrivateLinkResourcesSamples { - /* - * x-ms-original-file: 2026-05-01-preview/PrivateAccesses_GetPrivateLinkResources.json - */ - /** - * Sample code: List all possible private link resources under private access resource. - * - * @param manager Entry point to ChaosManager. - */ - public static void listAllPossiblePrivateLinkResourcesUnderPrivateAccessResource( - com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.privateAccesses() - .getPrivateLinkResourcesWithResponse("myResourceGroup", "myPrivateAccess", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesListByResourceGroupSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesListByResourceGroupSamples.java deleted file mode 100644 index 54d65c6350d4..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesListByResourceGroupSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -/** - * Samples for PrivateAccesses ListByResourceGroup. - */ -public final class PrivateAccessesListByResourceGroupSamples { - /* - * x-ms-original-file: 2026-05-01-preview/PrivateAccesses_List.json - */ - /** - * Sample code: List all private access in a resource group. - * - * @param manager Entry point to ChaosManager. - */ - public static void listAllPrivateAccessInAResourceGroup(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.privateAccesses().listByResourceGroup("myResourceGroup", null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesListPrivateEndpointConnectionsSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesListPrivateEndpointConnectionsSamples.java deleted file mode 100644 index 0f7fd6e50c15..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesListPrivateEndpointConnectionsSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -/** - * Samples for PrivateAccesses ListPrivateEndpointConnections. - */ -public final class PrivateAccessesListPrivateEndpointConnectionsSamples { - /* - * x-ms-original-file: 2026-05-01-preview/PrivateAccesses_ListPrivateEndpointConnections.json - */ - /** - * Sample code: List all private endpoint connections under a private access resource. - * - * @param manager Entry point to ChaosManager. - */ - public static void listAllPrivateEndpointConnectionsUnderAPrivateAccessResource( - com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.privateAccesses() - .listPrivateEndpointConnections("myResourceGroup", "myPrivateAccess", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesListSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesListSamples.java deleted file mode 100644 index 72cd2603ab49..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -/** - * Samples for PrivateAccesses List. - */ -public final class PrivateAccessesListSamples { - /* - * x-ms-original-file: 2026-05-01-preview/PrivateAccesses_ListAll.json - */ - /** - * Sample code: List all private accesses in a subscription. - * - * @param manager Entry point to ChaosManager. - */ - public static void listAllPrivateAccessesInASubscription(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.privateAccesses().list(null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesUpdateSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesUpdateSamples.java deleted file mode 100644 index 19cdbc24ac7f..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesUpdateSamples.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.resourcemanager.chaos.models.PrivateAccess; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for PrivateAccesses Update. - */ -public final class PrivateAccessesUpdateSamples { - /* - * x-ms-original-file: 2026-05-01-preview/PrivateAccesses_Update.json - */ - /** - * Sample code: Update a private access resource's tags. - * - * @param manager Entry point to ChaosManager. - */ - public static void updateAPrivateAccessResourceSTags(com.azure.resourcemanager.chaos.ChaosManager manager) { - PrivateAccess resource = manager.privateAccesses() - .getByResourceGroupWithResponse("myResourceGroup", "myPrivateAccess", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsCreateOrUpdateSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsCreateOrUpdateSamples.java deleted file mode 100644 index b8fdb4964eb4..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsCreateOrUpdateSamples.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.resourcemanager.chaos.models.ConfigurationExclusions; -import com.azure.resourcemanager.chaos.models.ConfigurationFilters; -import com.azure.resourcemanager.chaos.models.KeyValuePair; -import com.azure.resourcemanager.chaos.models.ScenarioConfigurationProperties; -import java.util.Arrays; - -/** - * Samples for ScenarioConfigurations CreateOrUpdate. - */ -public final class ScenarioConfigurationsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2026-05-01-preview/ScenarioConfigurations_CreateOrUpdate_With_Physical_Zones.json - */ - /** - * Sample code: Create or update a scenario configuration with physical zone targeting. - * - * @param manager Entry point to ChaosManager. - */ - public static void createOrUpdateAScenarioConfigurationWithPhysicalZoneTargeting( - com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.scenarioConfigurations() - .define("config-physical-zone") - .withExistingScenario("exampleRG", "exampleWorkspace", "12345678-1234-1234-1234-123456789012") - .withProperties(new ScenarioConfigurationProperties().withScenarioId( - "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Chaos/workspaces/exampleWorkspace/scenarios/12345678-1234-1234-1234-123456789012") - .withParameters(Arrays.asList(new KeyValuePair().withKey("fakeTokenPlaceholder").withValue("PT10M"))) - .withExclusions(new ConfigurationExclusions().withResources(Arrays.asList( - "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/protectedVM"))) - .withFilters(new ConfigurationFilters().withLocations(Arrays.asList("westus2")) - .withPhysicalZones(Arrays.asList("westus2-az1")))) - .create(); - } - - /* - * x-ms-original-file: 2026-05-01-preview/ScenarioConfigurations_CreateOrUpdate.json - */ - /** - * Sample code: Create or update a scenario configuration. - * - * @param manager Entry point to ChaosManager. - */ - public static void createOrUpdateAScenarioConfiguration(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.scenarioConfigurations() - .define("config-5678-9012-3456-789012345678") - .withExistingScenario("exampleRG", "exampleWorkspace", "12345678-1234-1234-1234-123456789012") - .withProperties(new ScenarioConfigurationProperties().withScenarioId( - "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Chaos/workspaces/exampleWorkspace/scenarios/12345678-1234-1234-1234-123456789012") - .withParameters(Arrays.asList(new KeyValuePair().withKey("fakeTokenPlaceholder").withValue("PT10M"), - new KeyValuePair().withKey("fakeTokenPlaceholder") - .withValue( - "[\"/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/vm1\",\"/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/vm2\"]"))) - .withExclusions(new ConfigurationExclusions().withResources(Arrays.asList( - "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/protectedVM")) - .withTags(Arrays.asList(new KeyValuePair().withKey("fakeTokenPlaceholder").withValue("production"))) - .withTypes(Arrays.asList("Microsoft.Compute/virtualMachineScaleSets"))) - .withFilters( - new ConfigurationFilters().withLocations(Arrays.asList("eastus")).withZones(Arrays.asList("1")))) - .create(); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsDeleteSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsDeleteSamples.java deleted file mode 100644 index 5157e7b806a1..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -/** - * Samples for ScenarioConfigurations Delete. - */ -public final class ScenarioConfigurationsDeleteSamples { - /* - * x-ms-original-file: 2026-05-01-preview/ScenarioConfigurations_Delete.json - */ - /** - * Sample code: Delete a scenario configuration. - * - * @param manager Entry point to ChaosManager. - */ - public static void deleteAScenarioConfiguration(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.scenarioConfigurations() - .delete("exampleRG", "exampleWorkspace", "12345678-1234-1234-1234-123456789012", - "config-5678-9012-3456-789012345678", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsExecuteSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsExecuteSamples.java deleted file mode 100644 index a69ac595f0d0..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsExecuteSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -/** - * Samples for ScenarioConfigurations Execute. - */ -public final class ScenarioConfigurationsExecuteSamples { - /* - * x-ms-original-file: 2026-05-01-preview/ScenarioConfigurations_Execute.json - */ - /** - * Sample code: Execute the scenario execution with the given scenario configuration. - * - * @param manager Entry point to ChaosManager. - */ - public static void executeTheScenarioExecutionWithTheGivenScenarioConfiguration( - com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.scenarioConfigurations() - .executeWithResponse("exampleRG", "exampleWorkspace", "12345678-1234-1234-1234-123456789012", - "config-5678-9012-3456-789012345678", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsFixResourcePermissionsSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsFixResourcePermissionsSamples.java deleted file mode 100644 index db6125ec7708..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsFixResourcePermissionsSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -/** - * Samples for ScenarioConfigurations FixResourcePermissions. - */ -public final class ScenarioConfigurationsFixResourcePermissionsSamples { - /* - * x-ms-original-file: 2026-05-01-preview/ScenarioConfigurations_FixResourcePermissions.json - */ - /** - * Sample code: Fixes resource permissions for the given scenario configuration. - * - * @param manager Entry point to ChaosManager. - */ - public static void - fixesResourcePermissionsForTheGivenScenarioConfiguration(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.scenarioConfigurations() - .fixResourcePermissions("exampleRG", "exampleWorkspace", "12345678-1234-1234-1234-123456789012", - "config-5678-9012-3456-789012345678", null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsGetSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsGetSamples.java deleted file mode 100644 index 6f1855b315b7..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -/** - * Samples for ScenarioConfigurations Get. - */ -public final class ScenarioConfigurationsGetSamples { - /* - * x-ms-original-file: 2026-05-01-preview/ScenarioConfigurations_Get.json - */ - /** - * Sample code: Get a scenario configuration. - * - * @param manager Entry point to ChaosManager. - */ - public static void getAScenarioConfiguration(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.scenarioConfigurations() - .getWithResponse("exampleRG", "exampleWorkspace", "12345678-1234-1234-1234-123456789012", - "config-5678-9012-3456-789012345678", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsListAllSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsListAllSamples.java deleted file mode 100644 index 589da9dea289..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsListAllSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -/** - * Samples for ScenarioConfigurations ListAll. - */ -public final class ScenarioConfigurationsListAllSamples { - /* - * x-ms-original-file: 2026-05-01-preview/ScenarioConfigurations_ListAll.json - */ - /** - * Sample code: Get a list of scenario configurations. - * - * @param manager Entry point to ChaosManager. - */ - public static void getAListOfScenarioConfigurations(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.scenarioConfigurations() - .listAll("exampleRG", "exampleWorkspace", "12345678-1234-1234-1234-123456789012", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsValidateSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsValidateSamples.java deleted file mode 100644 index c0d8219e2109..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsValidateSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -/** - * Samples for ScenarioConfigurations Validate. - */ -public final class ScenarioConfigurationsValidateSamples { - /* - * x-ms-original-file: 2026-05-01-preview/ScenarioConfigurations_Validate.json - */ - /** - * Sample code: Validate the given scenario configuration. - * - * @param manager Entry point to ChaosManager. - */ - public static void validateTheGivenScenarioConfiguration(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.scenarioConfigurations() - .validate("exampleRG", "exampleWorkspace", "12345678-1234-1234-1234-123456789012", - "config-5678-9012-3456-789012345678", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioRunsCancelSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioRunsCancelSamples.java deleted file mode 100644 index 9692affef61f..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioRunsCancelSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -/** - * Samples for ScenarioRuns Cancel. - */ -public final class ScenarioRunsCancelSamples { - /* - * x-ms-original-file: 2026-05-01-preview/ScenarioRuns_Cancel.json - */ - /** - * Sample code: Cancel a running scenario run. - * - * @param manager Entry point to ChaosManager. - */ - public static void cancelARunningScenarioRun(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.scenarioRuns() - .cancelWithResponse("exampleRG", "exampleWorkspace", "12345678-1234-1234-1234-123456789012", - "abcd1234-5678-9012-3456-789012345678", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioRunsGetSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioRunsGetSamples.java deleted file mode 100644 index d6032884cf77..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioRunsGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -/** - * Samples for ScenarioRuns Get. - */ -public final class ScenarioRunsGetSamples { - /* - * x-ms-original-file: 2026-05-01-preview/ScenarioRuns_Get.json - */ - /** - * Sample code: Get a scenario run. - * - * @param manager Entry point to ChaosManager. - */ - public static void getAScenarioRun(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.scenarioRuns() - .getWithResponse("exampleRG", "exampleWorkspace", "12345678-1234-1234-1234-123456789012", - "abcd1234-5678-9012-3456-789012345678", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioRunsListAllSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioRunsListAllSamples.java deleted file mode 100644 index 676e711038b4..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenarioRunsListAllSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -/** - * Samples for ScenarioRuns ListAll. - */ -public final class ScenarioRunsListAllSamples { - /* - * x-ms-original-file: 2026-05-01-preview/ScenarioRuns_ListAll.json - */ - /** - * Sample code: Get a list of scenario runs. - * - * @param manager Entry point to ChaosManager. - */ - public static void getAListOfScenarioRuns(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.scenarioRuns() - .listAll("exampleRG", "exampleWorkspace", "12345678-1234-1234-1234-123456789012", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenariosCreateOrUpdateSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenariosCreateOrUpdateSamples.java deleted file mode 100644 index 00b36adfa5ff..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenariosCreateOrUpdateSamples.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.resourcemanager.chaos.models.ExternalResource; -import com.azure.resourcemanager.chaos.models.KeyValuePair; -import com.azure.resourcemanager.chaos.models.ParameterType; -import com.azure.resourcemanager.chaos.models.ScenarioAction; -import com.azure.resourcemanager.chaos.models.ScenarioParameter; -import com.azure.resourcemanager.chaos.models.ScenarioProperties; -import java.util.Arrays; - -/** - * Samples for Scenarios CreateOrUpdate. - */ -public final class ScenariosCreateOrUpdateSamples { - /* - * x-ms-original-file: 2026-05-01-preview/Scenarios_CreateOrUpdate.json - */ - /** - * Sample code: Create or update a scenario. - * - * @param manager Entry point to ChaosManager. - */ - public static void createOrUpdateAScenario(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.scenarios() - .define("zoneDownScenario") - .withExistingWorkspace("exampleRG", "exampleWorkspace") - .withProperties(new ScenarioProperties().withDescription( - "Induces an outage of all discovered VM and VMSS instances in the target zone with an option to invoke custom scripted actions using Automation Runbooks. Additionally, it forces failover of discovered Redis instances to simulate backend zonal outage.") - .withParameters(Arrays.asList( - new ScenarioParameter().withName("duration") - .withType(ParameterType.STRING) - .withDefaultProperty("PT15M") - .withRequired(false) - .withDescription("The duration of the outage scenario."), - new ScenarioParameter().withName("customRunbook1ResourceId") - .withType(ParameterType.STRING) - .withRequired(false) - .withDescription( - "Optional custom runbook 1 resource ID. If not provided, this action will be skipped."), - new ScenarioParameter().withName("customRunbook1ParametersJson") - .withType(ParameterType.STRING) - .withDefaultProperty("{}") - .withRequired(false) - .withDescription("Optional custom runbook 1 parameters in JSON format."))) - .withActions( - Arrays - .asList( - new ScenarioAction().withName("vmssZoneDown") - .withActionId("urn:csci:microsoft:compute:shutdown/1.0.0") - .withDescription("Force shutdown VMSS instances in target zone") - .withDuration("%%{parameters.duration}%%") - .withParameters(Arrays.asList(new KeyValuePair().withKey("fakeTokenPlaceholder") - .withValue("%%{filters.zones}%%"))), - new ScenarioAction().withName("vmZoneDown") - .withActionId("urn:csci:microsoft:compute:shutdown/1.0.0") - .withDescription("Force shutdown VM instances in target zone") - .withDuration("%%{parameters.duration}%%") - .withParameters(Arrays.asList(new KeyValuePair().withKey("fakeTokenPlaceholder") - .withValue("%%{filters.zones}%%"))), - new ScenarioAction() - .withName("redisFailover") - .withActionId("urn:csci:microsoft:azureClusteredCacheForRedis:Reboot/1.0.0") - .withDescription("Force failover of Redis instances to simulate backend zonal outage") - .withDuration("PT5M") - .withParameters( - Arrays.asList( - new KeyValuePair().withKey("fakeTokenPlaceholder").withValue("PrimaryNode"))), - new ScenarioAction().withName("custom-runbook-1") - .withActionId("urn:csci:microsoft:Automation:StartRunbook/1.0.0") - .withDescription("Custom Runbook 1") - .withDuration("PT30M") - .withParameters(Arrays.asList(new KeyValuePair() - .withKey("fakeTokenPlaceholder") - .withValue("%%{parameters.customRunbook1ParametersJson}%%"))) - .withExternalResource(new ExternalResource().withResourceId( - "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Automation/automationAccounts/exampleAutomationAccount/runbooks/exampleRunbook"))))) - .create(); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenariosDeleteSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenariosDeleteSamples.java deleted file mode 100644 index a9a586a15322..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenariosDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -/** - * Samples for Scenarios Delete. - */ -public final class ScenariosDeleteSamples { - /* - * x-ms-original-file: 2026-05-01-preview/Scenarios_Delete.json - */ - /** - * Sample code: Delete a Scenario in a workspace. - * - * @param manager Entry point to ChaosManager. - */ - public static void deleteAScenarioInAWorkspace(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.scenarios() - .deleteWithResponse("exampleRG", "exampleWorkspace", "myVMShutdownScenario", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenariosGetSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenariosGetSamples.java deleted file mode 100644 index c8a8b505dea8..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenariosGetSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -/** - * Samples for Scenarios Get. - */ -public final class ScenariosGetSamples { - /* - * x-ms-original-file: 2026-05-01-preview/Scenarios_Get.json - */ - /** - * Sample code: Get a scenario. - * - * @param manager Entry point to ChaosManager. - */ - public static void getAScenario(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.scenarios() - .getWithResponse("exampleRG", "exampleWorkspace", "zoneDownScenario", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenariosListAllSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenariosListAllSamples.java deleted file mode 100644 index c06ff7474679..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/ScenariosListAllSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -/** - * Samples for Scenarios ListAll. - */ -public final class ScenariosListAllSamples { - /* - * x-ms-original-file: 2026-05-01-preview/Scenarios_ListAll.json - */ - /** - * Sample code: Get a list of scenarios. - * - * @param manager Entry point to ChaosManager. - */ - public static void getAListOfScenarios(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.scenarios().listAll("exampleRG", "exampleWorkspace", 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 3764e6f58dcf..e68e72c7ad82 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 @@ -9,7 +9,7 @@ */ public final class TargetTypesGetSamples { /* - * x-ms-original-file: 2026-05-01-preview/TargetTypes_Get.json + * x-ms-original-file: 2025-01-01/TargetTypes_Get.json */ /** * Sample code: Get a Target Type for westus2 location. 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 c3989b6ea744..0147ed93b116 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 @@ -9,7 +9,7 @@ */ public final class TargetTypesListSamples { /* - * x-ms-original-file: 2026-05-01-preview/TargetTypes_List.json + * x-ms-original-file: 2025-01-01/TargetTypes_List.json */ /** * Sample code: List all Target Types for westus2 location. 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 39a5d17d1d45..92be2532112d 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 @@ -13,7 +13,7 @@ */ public final class TargetsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-05-01-preview/Targets_CreateOrUpdate.json + * x-ms-original-file: 2025-01-01/Targets_CreateOrUpdate.json */ /** * Sample code: Create/update a Target that extends a virtual machine resource. 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 ecec48e9e951..57c24ce203bf 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 @@ -9,7 +9,7 @@ */ public final class TargetsDeleteSamples { /* - * x-ms-original-file: 2026-05-01-preview/Targets_Delete.json + * x-ms-original-file: 2025-01-01/Targets_Delete.json */ /** * Sample code: Delete a Target that extends a virtual machine resource. 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 0ac1fc116479..47a188328f45 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 @@ -9,7 +9,7 @@ */ public final class TargetsGetSamples { /* - * x-ms-original-file: 2026-05-01-preview/Targets_Get.json + * x-ms-original-file: 2025-01-01/Targets_Get.json */ /** * Sample code: Get a Target that extends a virtual machine resource. 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 2c8fcefc4b7e..9aa2a5841faf 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 @@ -9,7 +9,7 @@ */ public final class TargetsListSamples { /* - * x-ms-original-file: 2026-05-01-preview/Targets_List.json + * x-ms-original-file: 2025-01-01/Targets_List.json */ /** * Sample code: List all Targets that extend a virtual machine resource. diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/WorkspacesCreateOrUpdateSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/WorkspacesCreateOrUpdateSamples.java deleted file mode 100644 index 9f1c71dc0ac4..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/WorkspacesCreateOrUpdateSamples.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.resourcemanager.chaos.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.chaos.models.ResourceIdentity; -import com.azure.resourcemanager.chaos.models.UserAssignedIdentity; -import com.azure.resourcemanager.chaos.models.WorkspaceProperties; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for Workspaces CreateOrUpdate. - */ -public final class WorkspacesCreateOrUpdateSamples { - /* - * x-ms-original-file: 2026-05-01-preview/Workspaces_CreateOrUpdate.json - */ - /** - * Sample code: Create/update a workspace in a resource group. - * - * @param manager Entry point to ChaosManager. - */ - public static void createUpdateAWorkspaceInAResourceGroup(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.workspaces() - .define("exampleWorkspace") - .withRegion("westus2") - .withExistingResourceGroup("exampleRG") - .withProperties(new WorkspaceProperties().withScopes(Arrays - .asList("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/exampleResourceGroup"))) - .withTags(mapOf("environment", "production", "department", "engineering", "project", "chaos-testing")) - .withIdentity(new ResourceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/exampleResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleIdentity", - new UserAssignedIdentity()))) - .create(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/WorkspacesDeleteSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/WorkspacesDeleteSamples.java deleted file mode 100644 index 9229bcc0e582..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/WorkspacesDeleteSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -/** - * Samples for Workspaces Delete. - */ -public final class WorkspacesDeleteSamples { - /* - * x-ms-original-file: 2026-05-01-preview/Workspaces_Delete.json - */ - /** - * Sample code: Delete a Workspace in a resource group. - * - * @param manager Entry point to ChaosManager. - */ - public static void deleteAWorkspaceInAResourceGroup(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.workspaces().delete("exampleRG", "exampleWorkspace", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/WorkspacesGetByResourceGroupSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/WorkspacesGetByResourceGroupSamples.java deleted file mode 100644 index fbcb7324c9fb..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/WorkspacesGetByResourceGroupSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -/** - * Samples for Workspaces GetByResourceGroup. - */ -public final class WorkspacesGetByResourceGroupSamples { - /* - * x-ms-original-file: 2026-05-01-preview/Workspaces_Get.json - */ - /** - * Sample code: Get a Workspace in a resource group. - * - * @param manager Entry point to ChaosManager. - */ - public static void getAWorkspaceInAResourceGroup(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.workspaces() - .getByResourceGroupWithResponse("exampleRG", "exampleWorkspace", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/WorkspacesListByResourceGroupSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/WorkspacesListByResourceGroupSamples.java deleted file mode 100644 index 7b8e2d8676b0..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/WorkspacesListByResourceGroupSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -/** - * Samples for Workspaces ListByResourceGroup. - */ -public final class WorkspacesListByResourceGroupSamples { - /* - * x-ms-original-file: 2026-05-01-preview/Workspaces_List.json - */ - /** - * Sample code: List all Workspaces in a resource group. - * - * @param manager Entry point to ChaosManager. - */ - public static void listAllWorkspacesInAResourceGroup(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.workspaces().listByResourceGroup("exampleRG", null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/WorkspacesListSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/WorkspacesListSamples.java deleted file mode 100644 index 56d8643a2331..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/WorkspacesListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -/** - * Samples for Workspaces List. - */ -public final class WorkspacesListSamples { - /* - * x-ms-original-file: 2026-05-01-preview/Workspaces_ListAll.json - */ - /** - * Sample code: List all Workspaces in a subscription. - * - * @param manager Entry point to ChaosManager. - */ - public static void listAllWorkspacesInASubscription(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.workspaces().list(null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/WorkspacesRefreshRecommendationsSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/WorkspacesRefreshRecommendationsSamples.java deleted file mode 100644 index d592d8547015..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/WorkspacesRefreshRecommendationsSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -/** - * Samples for Workspaces RefreshRecommendations. - */ -public final class WorkspacesRefreshRecommendationsSamples { - /* - * x-ms-original-file: 2026-05-01-preview/Workspaces_RefreshRecommendations.json - */ - /** - * Sample code: Refresh recommendations for all scenarios in a workspace. - * - * @param manager Entry point to ChaosManager. - */ - public static void - refreshRecommendationsForAllScenariosInAWorkspace(com.azure.resourcemanager.chaos.ChaosManager manager) { - manager.workspaces().refreshRecommendations("exampleRG", "exampleWorkspace", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/WorkspacesUpdateSamples.java b/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/WorkspacesUpdateSamples.java deleted file mode 100644 index 7ef806981de9..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/samples/java/com/azure/resourcemanager/chaos/generated/WorkspacesUpdateSamples.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.resourcemanager.chaos.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.chaos.models.ResourceIdentity; -import com.azure.resourcemanager.chaos.models.UserAssignedIdentity; -import com.azure.resourcemanager.chaos.models.Workspace; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for Workspaces Update. - */ -public final class WorkspacesUpdateSamples { - /* - * x-ms-original-file: 2026-05-01-preview/Workspaces_Update.json - */ - /** - * Sample code: Update a Workspace in a resource group. - * - * @param manager Entry point to ChaosManager. - */ - public static void updateAWorkspaceInAResourceGroup(com.azure.resourcemanager.chaos.ChaosManager manager) { - Workspace resource = manager.workspaces() - .getByResourceGroupWithResponse("exampleRG", "exampleWorkspace", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withTags(mapOf("environment", "production", "department", "engineering", "project", "chaos-testing")) - .withIdentity(new ResourceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/exampleResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleIdentity", - new UserAssignedIdentity()))) - .apply(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionDependencyTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionDependencyTests.java deleted file mode 100644 index 801f5cee1d30..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionDependencyTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.chaos.models.ActionDependency; -import com.azure.resourcemanager.chaos.models.ActionDependencyType; -import com.azure.resourcemanager.chaos.models.ActionLifecycle; -import org.junit.jupiter.api.Assertions; - -public final class ActionDependencyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ActionDependency model - = BinaryData.fromString("{\"type\":\"Action\",\"name\":\"nlvxbcuii\",\"onActionLifecycle\":\"Start\"}") - .toObject(ActionDependency.class); - Assertions.assertEquals(ActionDependencyType.ACTION, model.type()); - Assertions.assertEquals("nlvxbcuii", model.name()); - Assertions.assertEquals(ActionLifecycle.START, model.onActionLifecycle()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ActionDependency model = new ActionDependency().withType(ActionDependencyType.ACTION) - .withName("nlvxbcuii") - .withOnActionLifecycle(ActionLifecycle.START); - model = BinaryData.fromObject(model).toObject(ActionDependency.class); - Assertions.assertEquals(ActionDependencyType.ACTION, model.type()); - Assertions.assertEquals("nlvxbcuii", model.name()); - Assertions.assertEquals(ActionLifecycle.START, model.onActionLifecycle()); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionInnerTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionInnerTests.java deleted file mode 100644 index 93e35e342bde..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionInnerTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.chaos.fluent.models.ActionInner; - -public final class ActionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ActionInner model = BinaryData.fromString( - "{\"properties\":{\"canonicalId\":\"aifmvikl\",\"displayName\":\"dvk\",\"description\":\"ejd\",\"actionName\":\"xcv\",\"version\":\"rhnj\",\"actionType\":\"Discrete\",\"supportedTargetTypes\":[{\"targetType\":\"novqfzge\",\"requiredPermissions\":[\"ftul\",\"ltducea\",\"tmczuomejwcwwqi\"]}],\"parametersSchema\":{},\"recommendedRoles\":[\"sx\",\"ojmsvpkjprvkwc\"]},\"id\":\"ql\",\"name\":\"yxgtczh\",\"type\":\"ydbsd\"}") - .toObject(ActionInner.class); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionListResultTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionListResultTests.java deleted file mode 100644 index 158bb64dad58..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionListResultTests.java +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.chaos.implementation.models.ActionListResult; -import org.junit.jupiter.api.Assertions; - -public final class ActionListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ActionListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"canonicalId\":\"nqqyba\",\"displayName\":\"euayjkqabqgzsles\",\"description\":\"bhernntiew\",\"actionName\":\"cv\",\"version\":\"uwrbehwagoh\",\"actionType\":\"Continuous\",\"supportedTargetTypes\":[{\"targetType\":\"rqemvvhmxt\",\"requiredPermissions\":[\"futacoebjvewzc\",\"znmwcp\",\"guaadraufactkahz\"]}],\"parametersSchema\":{},\"recommendedRoles\":[\"j\",\"iuxxpshneekulfg\",\"lqubkwdlen\"]},\"id\":\"sutujba\",\"name\":\"pjuohminyfl\",\"type\":\"orwmduvwpklv\"},{\"properties\":{\"canonicalId\":\"mygdxpgpqch\",\"displayName\":\"zepn\",\"description\":\"jcrxgibbdaxcon\",\"actionName\":\"zauorsuk\",\"version\":\"wbqpl\",\"actionType\":\"Discrete\",\"supportedTargetTypes\":[{\"targetType\":\"epzl\",\"requiredPermissions\":[\"wzsoldweyuqdunv\"]},{\"targetType\":\"nrwrbiork\",\"requiredPermissions\":[\"ywjhhgdnhx\",\"sivfomilo\"]},{\"targetType\":\"gdufiqnd\",\"requiredPermissions\":[\"zaofjchvcyy\",\"s\",\"gdotcubiipuipwo\",\"onmacjekniz\"]},{\"targetType\":\"qvci\",\"requiredPermissions\":[\"vfgmblrrilby\"]}],\"parametersSchema\":{},\"recommendedRoles\":[\"miccwrwfscjfnyn\",\"zqujizdvoqytiby\",\"wb\"]},\"id\":\"gyavu\",\"name\":\"pthjoxo\",\"type\":\"smsks\"},{\"properties\":{\"canonicalId\":\"iml\",\"displayName\":\"ljxkcgxxlx\",\"description\":\"fgcviz\",\"actionName\":\"dwl\",\"version\":\"lyoupfgfbkju\",\"actionType\":\"Cancelable\",\"supportedTargetTypes\":[{\"targetType\":\"fminsgowzf\",\"requiredPermissions\":[\"ttktlahbq\",\"ctxtgzukxi\",\"mmqtgqqqxhr\"]},{\"targetType\":\"rxcpjuisavo\",\"requiredPermissions\":[\"zfvazi\"]}],\"parametersSchema\":{},\"recommendedRoles\":[\"rqttbajlkatnw\",\"yiopi\",\"kqqfk\",\"vscx\"]},\"id\":\"mligov\",\"name\":\"brxk\",\"type\":\"mloazuru\"},{\"properties\":{\"canonicalId\":\"bgo\",\"displayName\":\"bteoybf\",\"description\":\"xakvvjgslor\",\"actionName\":\"lmywwtkgkxnyed\",\"version\":\"gyvudtjuewbc\",\"actionType\":\"Continuous\",\"supportedTargetTypes\":[{\"targetType\":\"hcjyxc\",\"requiredPermissions\":[\"vpayakkudzpx\"]},{\"targetType\":\"jplmagstcy\",\"requiredPermissions\":[\"fkyrk\",\"bdgiogsjk\",\"nwqjnoba\",\"yhddvia\"]},{\"targetType\":\"gfnmntfpmvmemfnc\",\"requiredPermissions\":[\"vvbalx\"]}],\"parametersSchema\":{},\"recommendedRoles\":[\"hpodbzev\"]},\"id\":\"dnhfuk\",\"name\":\"vsjcswsmystuluqy\",\"type\":\"fcvlerch\"}],\"nextLink\":\"bm\"}") - .toObject(ActionListResult.class); - Assertions.assertEquals("bm", model.nextLink()); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionPropertiesParametersSchemaTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionPropertiesParametersSchemaTests.java deleted file mode 100644 index 7188272f18ca..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionPropertiesParametersSchemaTests.java +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.chaos.models.ActionPropertiesParametersSchema; - -public final class ActionPropertiesParametersSchemaTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ActionPropertiesParametersSchema model - = BinaryData.fromString("{}").toObject(ActionPropertiesParametersSchema.class); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionPropertiesTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionPropertiesTests.java deleted file mode 100644 index c781b4e03121..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionPropertiesTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.chaos.fluent.models.ActionProperties; - -public final class ActionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ActionProperties model = BinaryData.fromString( - "{\"canonicalId\":\"m\",\"displayName\":\"maehvbbxurip\",\"description\":\"fnhtbaxkgxyw\",\"actionName\":\"kpyklyhp\",\"version\":\"odpvruudlgzib\",\"actionType\":\"Continuous\",\"supportedTargetTypes\":[{\"targetType\":\"ktst\",\"requiredPermissions\":[\"eclze\",\"qbcvhzlhplod\",\"kdl\",\"wqfbumlkxtrqjfsm\"]}],\"parametersSchema\":{},\"recommendedRoles\":[\"xhwgfwsrtaw\",\"oezbrhubsk\"]}") - .toObject(ActionProperties.class); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionSupportedTargetTypeTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionSupportedTargetTypeTests.java deleted file mode 100644 index 1ef4728d6729..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionSupportedTargetTypeTests.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.chaos.models.ActionSupportedTargetType; -import org.junit.jupiter.api.Assertions; - -public final class ActionSupportedTargetTypeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ActionSupportedTargetType model = BinaryData - .fromString("{\"targetType\":\"dyg\",\"requiredPermissions\":[\"kkqfqjbvle\",\"rfmluiqtq\",\"fa\"]}") - .toObject(ActionSupportedTargetType.class); - Assertions.assertEquals("dyg", model.targetType()); - Assertions.assertEquals("kkqfqjbvle", model.requiredPermissions().get(0)); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionVersionInnerTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionVersionInnerTests.java deleted file mode 100644 index 862c9fb49c18..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionVersionInnerTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.chaos.fluent.models.ActionVersionInner; - -public final class ActionVersionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ActionVersionInner model = BinaryData.fromString( - "{\"properties\":{\"canonicalId\":\"jbabwidf\",\"displayName\":\"sspuunnoxyhkx\",\"description\":\"ddrihpf\",\"actionName\":\"qcaaewdaomdjvl\",\"version\":\"x\",\"actionType\":\"Cancelable\",\"supportedTargetTypes\":[{\"targetType\":\"sgeivsiy\",\"requiredPermissions\":[\"dncj\",\"xonbzoggculapz\"]},{\"targetType\":\"rpgogtqxep\",\"requiredPermissions\":[\"b\"]},{\"targetType\":\"ajlyjtlvofqzhv\",\"requiredPermissions\":[\"byfmowuxr\",\"jpvd\"]},{\"targetType\":\"fzwiivwzjbhyz\",\"requiredPermissions\":[\"rkambt\",\"negvmnvuqe\",\"vldspa\",\"tjb\"]}],\"parametersSchema\":{},\"recommendedRoles\":[\"flvestmjlxrrilo\",\"apeewchpxlkt\"]},\"id\":\"uziycsl\",\"name\":\"vu\",\"type\":\"uztcktyhjtqed\"}") - .toObject(ActionVersionInner.class); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionVersionListResultTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionVersionListResultTests.java deleted file mode 100644 index 04eb01530dfc..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionVersionListResultTests.java +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.chaos.implementation.models.ActionVersionListResult; -import org.junit.jupiter.api.Assertions; - -public final class ActionVersionListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ActionVersionListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"canonicalId\":\"ulwm\",\"displayName\":\"qzz\",\"description\":\"jvpglydzgk\",\"actionName\":\"qeevt\",\"version\":\"pryu\",\"actionType\":\"Cancelable\",\"supportedTargetTypes\":[{\"targetType\":\"zdmovzv\",\"requiredPermissions\":[\"awzqadfl\",\"z\",\"riglaec\"]},{\"targetType\":\"dticokpvzml\",\"requiredPermissions\":[\"ld\",\"x\",\"bf\"]},{\"targetType\":\"clnpkci\",\"requiredPermissions\":[\"riykhyawfvjlbox\",\"vkjlmxhom\"]},{\"targetType\":\"nhdwdigumbnra\",\"requiredPermissions\":[\"zptjazysd\"]}],\"parametersSchema\":{},\"recommendedRoles\":[\"wwvaiqyuvvfonk\",\"hhqyi\"]},\"id\":\"y\",\"name\":\"auy\",\"type\":\"vluwmncsttij\"},{\"properties\":{\"canonicalId\":\"bvpoekrsgsgbdhu\",\"displayName\":\"gnjdgkynscliqhz\",\"description\":\"xnkomtkubo\",\"actionName\":\"pnvdxz\",\"version\":\"ihfrbbcevqa\",\"actionType\":\"Cancelable\",\"supportedTargetTypes\":[{\"targetType\":\"lfkqojpy\",\"requiredPermissions\":[\"trdcnifmzzs\"]},{\"targetType\":\"m\",\"requiredPermissions\":[\"ysuxmprafwgck\",\"ocxvdfffwafqr\",\"udaspavehh\",\"vkbunzozudh\"]},{\"targetType\":\"gkmoyxcdyuibhmfd\",\"requiredPermissions\":[\"ydvfvfcjnae\",\"isrvhm\"]},{\"targetType\":\"r\",\"requiredPermissions\":[\"kiscvwmzhwpl\",\"faxvxil\",\"btgn\"]}],\"parametersSchema\":{},\"recommendedRoles\":[\"yqxtjjfzql\",\"hycav\",\"dggxdbeesmi\"]},\"id\":\"nlrariaawiuagy\",\"name\":\"wqfbylyrfgiagt\",\"type\":\"ojocqwogf\"},{\"properties\":{\"canonicalId\":\"jvusfzldmozux\",\"displayName\":\"fsbtkad\",\"description\":\"s\",\"actionName\":\"nbtgkbugrjqctoj\",\"version\":\"isofieypefojyqd\",\"actionType\":\"Cancelable\",\"supportedTargetTypes\":[{\"targetType\":\"plcwkhi\",\"requiredPermissions\":[\"lhzdsqtzb\",\"rgnowcjhfgm\",\"ecactx\",\"wotey\"]},{\"targetType\":\"cluqovekqvgqo\",\"requiredPermissions\":[\"fzmpjwyivq\",\"kfxcvhrfs\",\"huagrttikteusqc\"]}],\"parametersSchema\":{},\"recommendedRoles\":[\"klxubyja\",\"fmmfblcqcu\",\"bgq\",\"brta\"]},\"id\":\"etttwgdslqxihhr\",\"name\":\"ooizqseyp\",\"type\":\"iut\"}],\"nextLink\":\"apzhyrpetoge\"}") - .toObject(ActionVersionListResult.class); - Assertions.assertEquals("apzhyrpetoge", model.nextLink()); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionVersionsGetWithResponseMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionVersionsGetWithResponseMockTests.java deleted file mode 100644 index 325e90efeff3..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionVersionsGetWithResponseMockTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.chaos.ChaosManager; -import com.azure.resourcemanager.chaos.models.ActionVersion; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ActionVersionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"canonicalId\":\"tudaw\",\"displayName\":\"jfel\",\"description\":\"rpptcbgqnzmnhiil\",\"actionName\":\"lwcjgckbbcccgzpr\",\"version\":\"xnyuffatsgftipwc\",\"actionType\":\"Discrete\",\"supportedTargetTypes\":[{\"targetType\":\"iqdxyurnpnuh\",\"requiredPermissions\":[\"ccnuhiig\",\"yl\",\"ui\"]}],\"parametersSchema\":{},\"recommendedRoles\":[\"atvcrkdlbnbq\",\"vhcs\"]},\"id\":\"zlwxaeaovur\",\"name\":\"xdndsbdweaderzm\",\"type\":\"ntopa\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ChaosManager manager = ChaosManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - ActionVersion response = manager.actionVersions() - .getWithResponse("ofqcvovjufycsjm", "bemyeji", "iuxegth", com.azure.core.util.Context.NONE) - .getValue(); - - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionVersionsListMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionVersionsListMockTests.java deleted file mode 100644 index cb6c9cc4d1e2..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionVersionsListMockTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.chaos.ChaosManager; -import com.azure.resourcemanager.chaos.models.ActionVersion; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ActionVersionsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"canonicalId\":\"krlgjm\",\"displayName\":\"drvcqguef\",\"description\":\"ompheqdur\",\"actionName\":\"yujlfyoumpckyecl\",\"version\":\"igptajbrzmqxucyc\",\"actionType\":\"Continuous\",\"supportedTargetTypes\":[{\"targetType\":\"iutgj\",\"requiredPermissions\":[\"yzjdnrqjbt\"]},{\"targetType\":\"eaoqaqbzgyhf\",\"requiredPermissions\":[\"uatbwbqamteuliy\"]},{\"targetType\":\"pkcvmwf\",\"requiredPermissions\":[\"xe\"]},{\"targetType\":\"ywbo\",\"requiredPermissions\":[\"qmiciijqp\"]}],\"parametersSchema\":{},\"recommendedRoles\":[\"ojxjmcsmyqwix\",\"cp\",\"nkwywzwofa\"]},\"id\":\"ckduoiqtamtyvskn\",\"name\":\"rwzawnvs\",\"type\":\"cfhzagxnvhycv\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ChaosManager manager = ChaosManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PagedIterable response = manager.actionVersions() - .list("ttmvmmagoaqylkjz", "jiuazjc", "mxitpfinzcpd", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionsGetWithResponseMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionsGetWithResponseMockTests.java deleted file mode 100644 index a490af118b0c..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionsGetWithResponseMockTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.chaos.ChaosManager; -import com.azure.resourcemanager.chaos.models.Action; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ActionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"canonicalId\":\"wnpqigtuujwouhd\",\"displayName\":\"s\",\"description\":\"rb\",\"actionName\":\"xsjybvitvqk\",\"version\":\"az\",\"actionType\":\"Cancelable\",\"supportedTargetTypes\":[{\"targetType\":\"m\",\"requiredPermissions\":[\"ch\",\"zfnkfexlvxno\",\"kizvoa\"]},{\"targetType\":\"naqln\",\"requiredPermissions\":[\"guyxlyk\",\"phvxz\",\"wxh\"]},{\"targetType\":\"ejtlk\",\"requiredPermissions\":[\"onwivkcqhrxhxkn\",\"ccrmmk\",\"upijubyqjfkakfq\",\"rke\"]}],\"parametersSchema\":{},\"recommendedRoles\":[\"dudxjascowvfdjk\",\"dxphlk\",\"snmgzvyfi\"]},\"id\":\"kzuqnwsith\",\"name\":\"q\",\"type\":\"ly\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ChaosManager manager = ChaosManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - Action response - = manager.actions().getWithResponse("pl", "dbmairrhvhfnr", com.azure.core.util.Context.NONE).getValue(); - - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionsListMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionsListMockTests.java deleted file mode 100644 index 69397bf7fbf5..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ActionsListMockTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.chaos.ChaosManager; -import com.azure.resourcemanager.chaos.models.Action; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ActionsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"canonicalId\":\"vqqugdrftbcv\",\"displayName\":\"reuquowtljvf\",\"description\":\"reagkhyxvrqt\",\"actionName\":\"czsulmdggl\",\"version\":\"pjpfseykgs\",\"actionType\":\"Continuous\",\"supportedTargetTypes\":[{\"targetType\":\"n\",\"requiredPermissions\":[\"p\",\"ylkvecjuj\"]},{\"targetType\":\"goadyedmzr\",\"requiredPermissions\":[\"oknub\",\"oitpkpztrgdgx\",\"coqra\"]},{\"targetType\":\"ugyxpqit\",\"requiredPermissions\":[\"alwvskbu\",\"z\"]}],\"parametersSchema\":{},\"recommendedRoles\":[\"ty\",\"tco\",\"cujp\"]},\"id\":\"xzak\",\"name\":\"ejkm\",\"type\":\"bizt\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ChaosManager manager = ChaosManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PagedIterable response - = manager.actions().list("hluqwquls", "trjbhxykfhyq", 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 251523d0f7c8..f8cd209cd23c 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 @@ -21,7 +21,7 @@ public final class CapabilitiesCreateOrUpdateWithResponseMockTests { @Test public void testCreateOrUpdateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"publisher\":\"dt\",\"targetType\":\"epu\",\"description\":\"vyjtcvu\",\"parametersSchema\":\"asiz\",\"urn\":\"sfuughtuqfecjx\",\"provisioningState\":\"Canceled\"},\"id\":\"uhxu\",\"name\":\"cbuewmrswnjlxuz\",\"type\":\"hwpusxj\"}"; + = "{\"properties\":{\"publisher\":\"cwsobqwcs\",\"targetType\":\"nwdcfhu\",\"description\":\"dpfuvg\",\"parametersSchema\":\"bjj\",\"urn\":\"nvxbvt\"},\"id\":\"dut\",\"name\":\"cormr\",\"type\":\"xqtvcofu\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,8 +31,8 @@ public void testCreateOrUpdateWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Capability response = manager.capabilities() - .createOrUpdateWithResponse("pnulaiywzej", "whslwkoj", "llndnpd", "rpqaf", "fugsnnfhyetefy", "oc", - new CapabilityInner(), com.azure.core.util.Context.NONE) + .createOrUpdateWithResponse("r", "tiagx", "dszue", "psbzkfzbeyvpn", "icvi", "v", 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 b445ed7c4ae7..9a72710fc22a 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 @@ -28,7 +28,7 @@ public void testDeleteWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.capabilities() - .deleteWithResponse("aqehg", "dohzjq", "tu", "o", "gebx", "cnwfepbnwgfmxjg", + .deleteWithResponse("f", "vkg", "u", "gdknnqv", "aznqntoru", "sgsahmkycgr", 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 29bd30200404..f252fcc1fd0a 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 @@ -20,7 +20,7 @@ public final class CapabilitiesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"publisher\":\"wrsnewmozqvbu\",\"targetType\":\"ma\",\"description\":\"sycxhxzgaz\",\"parametersSchema\":\"abo\",\"urn\":\"vmfqhppubo\",\"provisioningState\":\"Failed\"},\"id\":\"dfgkmtdh\",\"name\":\"rngbtcjuahokqtob\",\"type\":\"auxofshfph\"}"; + = "{\"properties\":{\"publisher\":\"patdooaojkniodko\",\"targetType\":\"bw\",\"description\":\"jhemms\",\"parametersSchema\":\"dkcrodt\",\"urn\":\"nfwjlfltkacjvefk\"},\"id\":\"foakgg\",\"name\":\"fpagaowpulp\",\"type\":\"blylsyxkqjnsj\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Capability response = manager.capabilities() - .getWithResponse("dndviauogp", "uartvti", "kyefchnmnahmnxhk", "jqirwrw", "ooxf", "i", + .getWithResponse("bpaxhexiilivpdt", "irqtdqoa", "oruzfgsquyfxrxx", "eptra", "xje", "wlwnwxuqlcv", 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 76b36dc91fa7..49c323cd0433 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 @@ -21,7 +21,7 @@ public final class CapabilitiesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"publisher\":\"wcegyamlbn\",\"targetType\":\"qa\",\"description\":\"jvpilguooqja\",\"parametersSchema\":\"d\",\"urn\":\"gueiookjbsahrtdt\",\"provisioningState\":\"Failed\"},\"id\":\"qacsl\",\"name\":\"otoebnfxofv\",\"type\":\"jkgd\"}]}"; + = "{\"value\":[{\"properties\":{\"publisher\":\"jed\",\"targetType\":\"wwa\",\"description\":\"kojvd\",\"parametersSchema\":\"zfoqouicybxar\",\"urn\":\"szufoxciqopidoa\"},\"id\":\"iodhkhazxkhnz\",\"name\":\"onlwntoeg\",\"type\":\"kdwbwhkszz\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,7 +31,7 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.capabilities() - .list("g", "jbgdlfgtdysnaquf", "qbctqha", "zjrwdkqze", "yjleziunjx", "fza", + .list("uwjuetaeburuvdmo", "s", "zlxwabmqoefkifr", "tpuqujmq", "gkfbtndoaong", "jcntuj", 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 4a00b144f1ae..6a8d58f48e60 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 @@ -11,7 +11,7 @@ public final class CapabilityInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CapabilityInner model = BinaryData.fromString( - "{\"properties\":{\"publisher\":\"hq\",\"targetType\":\"gjxpybczmehmt\",\"description\":\"pbsphrupidgs\",\"parametersSchema\":\"bejhphoycmsxa\",\"urn\":\"hdxbmtqio\",\"provisioningState\":\"Deleting\"},\"id\":\"htbmuf\",\"name\":\"ownoizhw\",\"type\":\"rxybqsoq\"}") + "{\"properties\":{\"publisher\":\"hq\",\"targetType\":\"gjxpybczmehmt\",\"description\":\"pbsphrupidgs\",\"parametersSchema\":\"bejhphoycmsxa\",\"urn\":\"hdxbmtqio\"},\"id\":\"zehtbmu\",\"name\":\"p\",\"type\":\"wnoi\"}") .toObject(CapabilityInner.class); } 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 76ed6f49e524..e377a730710d 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 @@ -12,8 +12,8 @@ public final class CapabilityListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CapabilityListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"publisher\":\"rifkwm\",\"targetType\":\"ktsizntocipaou\",\"description\":\"psqucmpoyf\",\"parametersSchema\":\"fogknygjofjdde\",\"urn\":\"rd\",\"provisioningState\":\"Failed\"},\"id\":\"wnw\",\"name\":\"eitjz\",\"type\":\"flusarhmof\"},{\"properties\":{\"publisher\":\"smy\",\"targetType\":\"kdtmlxhekuk\",\"description\":\"txukcdmp\",\"parametersSchema\":\"cryuan\",\"urn\":\"uxzdxtay\",\"provisioningState\":\"Succeeded\"},\"id\":\"whfpmrqobmtu\",\"name\":\"knryrtihfxtij\",\"type\":\"pzvgnwzsymglzufc\"}],\"nextLink\":\"kohdbiha\"}") + "{\"value\":[{\"properties\":{\"publisher\":\"sqe\",\"targetType\":\"agdfmglzlh\",\"description\":\"rifkwm\",\"parametersSchema\":\"ktsizntocipaou\",\"urn\":\"psqucmpoyf\"},\"id\":\"fogknygjofjdde\",\"name\":\"s\",\"type\":\"deupewnwrei\"},{\"properties\":{\"publisher\":\"yflusarhmofc\",\"targetType\":\"smy\",\"description\":\"kdtmlxhekuk\",\"parametersSchema\":\"txukcdmp\",\"urn\":\"cryuan\"},\"id\":\"uxzdxtay\",\"name\":\"lhmwhfpmrqobm\",\"type\":\"u\"}],\"nextLink\":\"nryrtihf\"}") .toObject(CapabilityListResult.class); - Assertions.assertEquals("kohdbiha", model.nextLink()); + Assertions.assertEquals("nryrtihf", model.nextLink()); } } 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 0a9f7e450652..b64bab1f7515 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 @@ -11,7 +11,7 @@ public final class CapabilityPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CapabilityProperties model = BinaryData.fromString( - "{\"publisher\":\"gkdmb\",\"targetType\":\"zlobcufpd\",\"description\":\"rbt\",\"parametersSchema\":\"qjnqglhqgnufoooj\",\"urn\":\"ifsqesaagdfmg\",\"provisioningState\":\"Failed\"}") + "{\"publisher\":\"wlrxyb\",\"targetType\":\"oqijgkdmbpaz\",\"description\":\"bc\",\"parametersSchema\":\"pdznrbtcqqjnqgl\",\"urn\":\"gnufoooj\"}") .toObject(CapabilityProperties.class); } 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 73cf4b0670a0..abcd8a69e18d 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,7 +11,7 @@ public final class CapabilityTypeInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CapabilityTypeInner model = BinaryData.fromString( - "{\"properties\":{\"publisher\":\"wtnhxbnjbiksqr\",\"targetType\":\"ssainqpjwnzll\",\"displayName\":\"mppeebvmgxs\",\"description\":\"kyqduujit\",\"parametersSchema\":\"czdzev\",\"urn\":\"hkr\",\"kind\":\"d\",\"azureRbacActions\":[\"dsbdkvwrwjf\"],\"azureRbacDataActions\":[\"nhutjeltmrldhugj\"],\"requiredAzureRoleDefinitionIds\":[\"atqxho\",\"dgeablgphu\",\"icndvkaozwyifty\",\"xhurok\"],\"runtimeProperties\":{\"kind\":\"xolniwpwcukjfk\"}},\"id\":\"awxklr\",\"name\":\"plwckbas\",\"type\":\"ypnddhsgcb\"}") + "{\"properties\":{\"publisher\":\"jwnzlljfmp\",\"targetType\":\"ebvmgxsabkyqd\",\"displayName\":\"jitcjczdzevn\",\"description\":\"krwpdap\",\"parametersSchema\":\"sbdkvwr\",\"urn\":\"feusnhut\",\"kind\":\"ltmrldh\",\"azureRbacActions\":[\"zzd\"],\"azureRbacDataActions\":[\"xhocdgeablgphuti\",\"ndv\",\"aozwyiftyhxhu\",\"okftyxolniwpwcuk\"],\"requiredAzureRoleDefinitionIds\":[\"giawx\",\"lryplwckbasyy\",\"nddhsgcbacph\",\"jkot\"],\"runtimeProperties\":{\"kind\":\"gou\"}},\"id\":\"ndlik\",\"name\":\"yqkgfg\",\"type\":\"bmadgak\"}") .toObject(CapabilityTypeInner.class); } } 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 0378162124e0..52a1957074c7 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 @@ -12,8 +12,8 @@ public final class CapabilityTypeListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CapabilityTypeListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"publisher\":\"wrlyxwjkcprb\",\"targetType\":\"b\",\"displayName\":\"jvtbvpyss\",\"description\":\"nruj\",\"parametersSchema\":\"uhmuouqfprwzwbn\",\"urn\":\"itnwuizgazxufi\",\"kind\":\"ckyfih\",\"azureRbacActions\":[\"dfvzwdzuhty\"],\"azureRbacDataActions\":[\"sdkf\",\"hwxmnteiwa\",\"pvkmijcmmxdcuf\",\"fsrpymzidnse\"],\"requiredAzureRoleDefinitionIds\":[\"tbzsgfyccs\",\"ewmdw\",\"jeiachboosfl\",\"ro\"],\"runtimeProperties\":{\"kind\":\"pteehzzv\"}},\"id\":\"yqrimzin\",\"name\":\"vswjdk\",\"type\":\"rsoodqxhcrmnoh\"},{\"properties\":{\"publisher\":\"kwh\",\"targetType\":\"oifiyipjxsqwpgr\",\"displayName\":\"znorcj\",\"description\":\"snb\",\"parametersSchema\":\"qabnmoc\",\"urn\":\"ysh\",\"kind\":\"zafb\",\"azureRbacActions\":[\"gpbtoqcjmklj\"],\"azureRbacDataActions\":[\"qidtqajzyu\",\"pku\"],\"requiredAzureRoleDefinitionIds\":[\"rlkhbzhfepgzgq\",\"xzlocxscp\",\"ierhhbcsglummaj\"],\"runtimeProperties\":{\"kind\":\"odxobnbdxkqpxok\"}},\"id\":\"ionpimexg\",\"name\":\"txgcpodgmaajr\",\"type\":\"vdjwzrlovm\"},{\"properties\":{\"publisher\":\"hijco\",\"targetType\":\"ctbzaq\",\"displayName\":\"sycbkbfk\",\"description\":\"kdkexxp\",\"parametersSchema\":\"fmxa\",\"urn\":\"fjpgddtocjjxhvp\",\"kind\":\"uexhdzx\",\"azureRbacActions\":[\"eojnxqbzvddn\",\"wndeicbtwnp\",\"aoqvuh\",\"hcffcyddglmjthjq\"],\"azureRbacDataActions\":[\"yeicxmqciwqvhk\",\"ixuigdtopbobj\"],\"requiredAzureRoleDefinitionIds\":[\"m\"],\"runtimeProperties\":{\"kind\":\"a\"}},\"id\":\"uhrzayvvt\",\"name\":\"gvdfgiotkftutq\",\"type\":\"ln\"}],\"nextLink\":\"lefgugnxk\"}") + "{\"value\":[{\"properties\":{\"publisher\":\"rkujy\",\"targetType\":\"l\",\"displayName\":\"uvfqawrlyxwj\",\"description\":\"prbnwbxgjvtbv\",\"parametersSchema\":\"sszdnru\",\"urn\":\"guhmuouqfpr\",\"kind\":\"wbnguitnwui\",\"azureRbacActions\":[\"zxufiz\"],\"azureRbacDataActions\":[\"y\"],\"requiredAzureRoleDefinitionIds\":[\"rfidfvzwdz\"],\"runtimeProperties\":{\"kind\":\"ymwisdkft\"}},\"id\":\"xmnteiwaop\",\"name\":\"km\",\"type\":\"jcmmxdcufufsrp\"},{\"properties\":{\"publisher\":\"idnsezcxtb\",\"targetType\":\"gfycc\",\"displayName\":\"ewmdw\",\"description\":\"eiachboosflnr\",\"parametersSchema\":\"fqpte\",\"urn\":\"zzvypyqrimzinp\",\"kind\":\"wjdk\",\"azureRbacActions\":[\"oodqxhcrm\",\"ohjtckw\",\"dsoifiyipj\",\"sqwpgrjb\"],\"azureRbacDataActions\":[\"rcjxvsnbyxqabn\",\"ocpcy\",\"hurzafblj\"],\"requiredAzureRoleDefinitionIds\":[\"btoqcjmkljavbqid\",\"qajzyulpkudjkr\",\"khbzhfepgzg\"],\"runtimeProperties\":{\"kind\":\"zloc\"}},\"id\":\"c\",\"name\":\"aierhhb\",\"type\":\"sglumma\"},{\"properties\":{\"publisher\":\"aodxo\",\"targetType\":\"bdxkqpxokaj\",\"displayName\":\"npime\",\"description\":\"stxgc\",\"parametersSchema\":\"dg\",\"urn\":\"ajrmvdjwzrlovmc\",\"kind\":\"hijco\",\"azureRbacActions\":[\"tbzaqsqsycbkbfk\",\"ukdkexxppofmxa\"],\"azureRbacDataActions\":[\"jpgd\",\"toc\",\"j\",\"hvpmoue\"],\"requiredAzureRoleDefinitionIds\":[\"zxibqeoj\",\"xqbzvddntwnd\",\"icbtwnpzao\",\"vuhrhcffcyddgl\"],\"runtimeProperties\":{\"kind\":\"hjq\"}},\"id\":\"pyeicxm\",\"name\":\"ciwqvhk\",\"type\":\"ixuigdtopbobj\"},{\"properties\":{\"publisher\":\"m\",\"targetType\":\"u\",\"displayName\":\"a\",\"description\":\"rzayv\",\"parametersSchema\":\"pgvdf\",\"urn\":\"otkftutqxlngx\",\"kind\":\"fgugnxkrxdqmid\",\"azureRbacActions\":[\"zrvqdr\",\"bhj\"],\"azureRbacDataActions\":[\"gehoqfbowskany\",\"tzlcuiywgqywgn\"],\"requiredAzureRoleDefinitionIds\":[\"ynhz\",\"pphrcgynco\",\"pec\"],\"runtimeProperties\":{\"kind\":\"mcoo\"}},\"id\":\"xlzevgbmqjqabcy\",\"name\":\"mivkwlzuvcc\",\"type\":\"wnfnbacf\"}],\"nextLink\":\"nlebxetqgtzxd\"}") .toObject(CapabilityTypeListResult.class); - Assertions.assertEquals("lefgugnxk", model.nextLink()); + Assertions.assertEquals("nlebxetqgtzxd", model.nextLink()); } } 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 afb48dd8f9a9..7052108ecaa2 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,7 +10,7 @@ public final class CapabilityTypePropertiesRuntimePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - CapabilityTypePropertiesRuntimeProperties model - = BinaryData.fromString("{\"kind\":\"eju\"}").toObject(CapabilityTypePropertiesRuntimeProperties.class); + CapabilityTypePropertiesRuntimeProperties model = BinaryData.fromString("{\"kind\":\"jaoyfhrtx\"}") + .toObject(CapabilityTypePropertiesRuntimeProperties.class); } } 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 115c5144e2fe..73abafd16230 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 @@ -11,7 +11,7 @@ public final class CapabilityTypePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CapabilityTypeProperties model = BinaryData.fromString( - "{\"publisher\":\"phejkotynqgoulz\",\"targetType\":\"likwyqkgfgib\",\"displayName\":\"dgak\",\"description\":\"s\",\"parametersSchema\":\"yb\",\"urn\":\"qedqytbciqfoufl\",\"kind\":\"nkzsmodmglou\",\"azureRbacActions\":[\"kwtmutduqktapspw\"],\"azureRbacDataActions\":[\"ertumkdo\",\"vqwhbmdgbbjfd\"],\"requiredAzureRoleDefinitionIds\":[\"bmbexppbhtqqro\",\"fpfpsalgbquxigj\",\"jgzjaoyfhrtx\"],\"runtimeProperties\":{\"kind\":\"erkujys\"}}") + "{\"publisher\":\"s\",\"targetType\":\"yb\",\"displayName\":\"qedqytbciqfoufl\",\"description\":\"nkzsmodmglou\",\"parametersSchema\":\"b\",\"urn\":\"tmut\",\"kind\":\"qktapspwgcuert\",\"azureRbacActions\":[\"dosvqwhbmdgbbjf\",\"dgmb\"],\"azureRbacDataActions\":[\"xppbhtqqro\"],\"requiredAzureRoleDefinitionIds\":[\"fpsalgbqu\"],\"runtimeProperties\":{\"kind\":\"jyj\"}}") .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 8bc07bbf54ba..32013821dc8d 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 @@ -20,7 +20,7 @@ public final class CapabilityTypesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"publisher\":\"bdxnaz\",\"targetType\":\"kml\",\"displayName\":\"evfxzopjhbzxlioh\",\"description\":\"dd\",\"parametersSchema\":\"gxqbawpcb\",\"urn\":\"zqcyknap\",\"kind\":\"fyuicdh\",\"azureRbacActions\":[\"ybww\"],\"azureRbacDataActions\":[\"vibidmhmwffpl\"],\"requiredAzureRoleDefinitionIds\":[\"vapckccrrvwey\"],\"runtimeProperties\":{\"kind\":\"yyukphaimmo\"}},\"id\":\"oqboshbragapyyr\",\"name\":\"fsv\",\"type\":\"pavbo\"}"; + = "{\"properties\":{\"publisher\":\"vtldgmfpgvmpip\",\"targetType\":\"ltha\",\"displayName\":\"x\",\"description\":\"mwutwbdsre\",\"parametersSchema\":\"drhneuyow\",\"urn\":\"d\",\"kind\":\"t\",\"azureRbacActions\":[\"bi\"],\"azureRbacDataActions\":[\"pikpz\",\"mejzanlfzxia\",\"rmbzo\"],\"requiredAzureRoleDefinitionIds\":[\"i\",\"rjqc\"],\"runtimeProperties\":{\"kind\":\"zpfrla\"}},\"id\":\"zrnw\",\"name\":\"iin\",\"type\":\"fpwpjylwbt\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); CapabilityType response = manager.capabilityTypes() - .getWithResponse("tlyo", "rrrouuxvnsa", "bcrymodizrx", com.azure.core.util.Context.NONE) + .getWithResponse("gzrf", "eeyebi", "ikayuhqlbjbsybb", com.azure.core.util.Context.NONE) .getValue(); } 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 a8bad7e978d7..8c6153ce38d2 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 @@ -21,7 +21,7 @@ public final class CapabilityTypesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"publisher\":\"qepvufhbzeh\",\"targetType\":\"hoqhnl\",\"displayName\":\"nbldxeaclgschori\",\"description\":\"rsrrmoucsofldp\",\"parametersSchema\":\"iyfc\",\"urn\":\"beolh\",\"kind\":\"lvbmxuqibsxtkcu\",\"azureRbacActions\":[\"sfar\"],\"azureRbacDataActions\":[\"owlkjxnqpv\"],\"requiredAzureRoleDefinitionIds\":[\"stmhqykizmd\",\"saoafcluqvox\",\"ycjimryvwgcwwpbm\",\"gwe\"],\"runtimeProperties\":{\"kind\":\"sxwef\"}},\"id\":\"ecb\",\"name\":\"opwndyqleallk\",\"type\":\"mtkhlowkxxpvbr\"}]}"; + = "{\"value\":[{\"properties\":{\"publisher\":\"ofel\",\"targetType\":\"grqmqhldvrii\",\"displayName\":\"jnalghf\",\"description\":\"tvsexsowuel\",\"parametersSchema\":\"hhahhxvrhmzkwpjg\",\"urn\":\"spughftqsxhq\",\"kind\":\"j\",\"azureRbacActions\":[\"ndxdigrjguufzdm\",\"yqtfihwh\",\"otzi\"],\"azureRbacDataActions\":[\"mvpp\",\"o\",\"zqzudph\",\"amvdkfwynwcvtbv\"],\"requiredAzureRoleDefinitionIds\":[\"hmtnvy\",\"iatkzwpcnp\",\"zcjaesgvvsccy\"],\"runtimeProperties\":{\"kind\":\"uq\"}},\"id\":\"wygzlvdnkfxusem\",\"name\":\"wzrmuh\",\"type\":\"pfcqdp\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,7 +31,7 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.capabilityTypes().list("fppdbwnu", "gahxkumasjcaa", "fdmmcpug", com.azure.core.util.Context.NONE); + = manager.capabilityTypes().list("h", "lsj", "dhszfjv", com.azure.core.util.Context.NONE); } } 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 3d85ceeccb74..83ac5f1afd36 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,16 +11,15 @@ public final class ChaosExperimentActionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ChaosExperimentAction model - = BinaryData.fromString("{\"type\":\"ChaosExperimentAction\",\"name\":\"frzpwvlqdqgb\"}") - .toObject(ChaosExperimentAction.class); - Assertions.assertEquals("frzpwvlqdqgb", model.name()); + ChaosExperimentAction model = BinaryData.fromString("{\"type\":\"ChaosExperimentAction\",\"name\":\"fkts\"}") + .toObject(ChaosExperimentAction.class); + Assertions.assertEquals("fkts", model.name()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ChaosExperimentAction model = new ChaosExperimentAction().withName("frzpwvlqdqgb"); + ChaosExperimentAction model = new ChaosExperimentAction().withName("fkts"); model = BinaryData.fromObject(model).toObject(ChaosExperimentAction.class); - Assertions.assertEquals("frzpwvlqdqgb", model.name()); + Assertions.assertEquals("fkts", 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 5ffd335f5b71..282de5fdcfa2 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 @@ -14,20 +14,19 @@ public final class ChaosExperimentBranchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ChaosExperimentBranch model = BinaryData.fromString( - "{\"name\":\"zf\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"eyp\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"wrmjmwvvjektc\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"senhwlrs\"}]}") + "{\"name\":\"xywnytnrsynlqidy\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"xczfcl\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"aaxdbabphlwrq\"}]}") .toObject(ChaosExperimentBranch.class); - Assertions.assertEquals("zf", model.name()); - Assertions.assertEquals("eyp", model.actions().get(0).name()); + Assertions.assertEquals("xywnytnrsynlqidy", model.name()); + Assertions.assertEquals("xczfcl", model.actions().get(0).name()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ChaosExperimentBranch model = new ChaosExperimentBranch().withName("zf") - .withActions(Arrays.asList(new ChaosExperimentAction().withName("eyp"), - new ChaosExperimentAction().withName("wrmjmwvvjektc"), - new ChaosExperimentAction().withName("senhwlrs"))); + ChaosExperimentBranch model = new ChaosExperimentBranch().withName("xywnytnrsynlqidy") + .withActions(Arrays.asList(new ChaosExperimentAction().withName("xczfcl"), + new ChaosExperimentAction().withName("aaxdbabphlwrq"))); model = BinaryData.fromObject(model).toObject(ChaosExperimentBranch.class); - Assertions.assertEquals("zf", model.name()); - Assertions.assertEquals("eyp", model.actions().get(0).name()); + Assertions.assertEquals("xywnytnrsynlqidy", model.name()); + Assertions.assertEquals("xczfcl", 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 d304d498057d..3309f26aa5b9 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 @@ -15,28 +15,30 @@ public final class ChaosExperimentStepTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ChaosExperimentStep model = BinaryData.fromString( - "{\"name\":\"hwankixzbinjepu\",\"branches\":[{\"name\":\"mryw\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"zoqftiyqzrnkcqvy\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"lwh\"}]},{\"name\":\"lsicohoqqnwv\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"yav\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"hheunmmqhgyx\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"konocu\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"oklyaxuconuq\"}]}]}") + "{\"name\":\"riwflzlfb\",\"branches\":[{\"name\":\"puz\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"ispnqzahmgkbrp\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"y\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"hibnuqqkpika\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"rgvtqag\"}]},{\"name\":\"buynhijggm\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"fsiarbutr\"}]},{\"name\":\"vpnazzm\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"runmp\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"ttdbhrbnl\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"nkxmyskpbhenbtk\"}]}]}") .toObject(ChaosExperimentStep.class); - Assertions.assertEquals("hwankixzbinjepu", model.name()); - Assertions.assertEquals("mryw", model.branches().get(0).name()); - Assertions.assertEquals("zoqftiyqzrnkcqvy", model.branches().get(0).actions().get(0).name()); + Assertions.assertEquals("riwflzlfb", model.name()); + Assertions.assertEquals("puz", model.branches().get(0).name()); + Assertions.assertEquals("ispnqzahmgkbrp", model.branches().get(0).actions().get(0).name()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ChaosExperimentStep model = new ChaosExperimentStep().withName("hwankixzbinjepu") + ChaosExperimentStep model = new ChaosExperimentStep().withName("riwflzlfb") .withBranches(Arrays.asList( - new ChaosExperimentBranch().withName("mryw") - .withActions(Arrays.asList(new ChaosExperimentAction().withName("zoqftiyqzrnkcqvy"), - new ChaosExperimentAction().withName("lwh"))), - new ChaosExperimentBranch().withName("lsicohoqqnwv") - .withActions(Arrays.asList(new ChaosExperimentAction().withName("yav"), - new ChaosExperimentAction().withName("hheunmmqhgyx"), - new ChaosExperimentAction().withName("konocu"), - new ChaosExperimentAction().withName("oklyaxuconuq"))))); + new ChaosExperimentBranch().withName("puz") + .withActions(Arrays.asList(new ChaosExperimentAction().withName("ispnqzahmgkbrp"), + new ChaosExperimentAction().withName("y"), new ChaosExperimentAction().withName("hibnuqqkpika"), + new ChaosExperimentAction().withName("rgvtqag"))), + new ChaosExperimentBranch().withName("buynhijggm") + .withActions(Arrays.asList(new ChaosExperimentAction().withName("fsiarbutr"))), + new ChaosExperimentBranch().withName("vpnazzm") + .withActions(Arrays.asList(new ChaosExperimentAction().withName("runmp"), + new ChaosExperimentAction().withName("ttdbhrbnl"), + new ChaosExperimentAction().withName("nkxmyskpbhenbtk"))))); model = BinaryData.fromObject(model).toObject(ChaosExperimentStep.class); - Assertions.assertEquals("hwankixzbinjepu", model.name()); - Assertions.assertEquals("mryw", model.branches().get(0).name()); - Assertions.assertEquals("zoqftiyqzrnkcqvy", model.branches().get(0).actions().get(0).name()); + Assertions.assertEquals("riwflzlfb", model.name()); + Assertions.assertEquals("puz", model.branches().get(0).name()); + Assertions.assertEquals("ispnqzahmgkbrp", model.branches().get(0).actions().get(0).name()); } } 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 2446c73f97c8..c7f12b9013cc 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 @@ -16,26 +16,23 @@ public final class ChaosTargetListSelectorTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ChaosTargetListSelector model = BinaryData.fromString( - "{\"type\":\"List\",\"targets\":[{\"type\":\"ChaosTarget\",\"id\":\"epcyvahfnlj\"},{\"type\":\"ChaosTarget\",\"id\":\"qxj\"},{\"type\":\"ChaosTarget\",\"id\":\"ujqgidok\"},{\"type\":\"ChaosTarget\",\"id\":\"ljyoxgvcltb\"}],\"id\":\"sncghkjeszz\",\"filter\":{\"type\":\"ChaosTargetFilter\"}}") + "{\"type\":\"List\",\"targets\":[{\"type\":\"ChaosTarget\",\"id\":\"ncuxrhdwb\"},{\"type\":\"ChaosTarget\",\"id\":\"xbniwdjs\"}],\"id\":\"zt\",\"filter\":{\"type\":\"ChaosTargetFilter\"}}") .toObject(ChaosTargetListSelector.class); - Assertions.assertEquals("sncghkjeszz", model.id()); + Assertions.assertEquals("zt", model.id()); Assertions.assertEquals(TargetReferenceType.CHAOS_TARGET, model.targets().get(0).type()); - Assertions.assertEquals("epcyvahfnlj", model.targets().get(0).id()); + Assertions.assertEquals("ncuxrhdwb", model.targets().get(0).id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ChaosTargetListSelector model - = new ChaosTargetListSelector().withId("sncghkjeszz") - .withFilter(new ChaosTargetFilter()) - .withTargets(Arrays.asList( - new TargetReference().withType(TargetReferenceType.CHAOS_TARGET).withId("epcyvahfnlj"), - new TargetReference().withType(TargetReferenceType.CHAOS_TARGET).withId("qxj"), - new TargetReference().withType(TargetReferenceType.CHAOS_TARGET).withId("ujqgidok"), - new TargetReference().withType(TargetReferenceType.CHAOS_TARGET).withId("ljyoxgvcltb"))); + ChaosTargetListSelector model = new ChaosTargetListSelector().withId("zt") + .withFilter(new ChaosTargetFilter()) + .withTargets( + Arrays.asList(new TargetReference().withType(TargetReferenceType.CHAOS_TARGET).withId("ncuxrhdwb"), + new TargetReference().withType(TargetReferenceType.CHAOS_TARGET).withId("xbniwdjs"))); model = BinaryData.fromObject(model).toObject(ChaosTargetListSelector.class); - Assertions.assertEquals("sncghkjeszz", model.id()); + Assertions.assertEquals("zt", model.id()); Assertions.assertEquals(TargetReferenceType.CHAOS_TARGET, model.targets().get(0).type()); - Assertions.assertEquals("epcyvahfnlj", model.targets().get(0).id()); + Assertions.assertEquals("ncuxrhdwb", 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 987f22e1fa1f..ea390f847571 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 @@ -14,22 +14,22 @@ public final class ChaosTargetQuerySelectorTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ChaosTargetQuerySelector model = BinaryData.fromString( - "{\"type\":\"Query\",\"queryString\":\"mpvecxgodebfqk\",\"subscriptionIds\":[\"bmpukgriwflz\",\"fbxzpuzycisp\",\"qzahmgkbrp\"],\"id\":\"y\",\"filter\":{\"type\":\"ChaosTargetFilter\"}}") + "{\"type\":\"Query\",\"queryString\":\"ytxhp\",\"subscriptionIds\":[\"bzpfzab\",\"lcuhxwtctyqiklb\"],\"id\":\"ovplw\",\"filter\":{\"type\":\"ChaosTargetFilter\"}}") .toObject(ChaosTargetQuerySelector.class); - Assertions.assertEquals("y", model.id()); - Assertions.assertEquals("mpvecxgodebfqk", model.queryString()); - Assertions.assertEquals("bmpukgriwflz", model.subscriptionIds().get(0)); + Assertions.assertEquals("ovplw", model.id()); + Assertions.assertEquals("ytxhp", model.queryString()); + Assertions.assertEquals("bzpfzab", model.subscriptionIds().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ChaosTargetQuerySelector model = new ChaosTargetQuerySelector().withId("y") + ChaosTargetQuerySelector model = new ChaosTargetQuerySelector().withId("ovplw") .withFilter(new ChaosTargetFilter()) - .withQueryString("mpvecxgodebfqk") - .withSubscriptionIds(Arrays.asList("bmpukgriwflz", "fbxzpuzycisp", "qzahmgkbrp")); + .withQueryString("ytxhp") + .withSubscriptionIds(Arrays.asList("bzpfzab", "lcuhxwtctyqiklb")); model = BinaryData.fromObject(model).toObject(ChaosTargetQuerySelector.class); - Assertions.assertEquals("y", model.id()); - Assertions.assertEquals("mpvecxgodebfqk", model.queryString()); - Assertions.assertEquals("bmpukgriwflz", model.subscriptionIds().get(0)); + Assertions.assertEquals("ovplw", model.id()); + Assertions.assertEquals("ytxhp", model.queryString()); + Assertions.assertEquals("bzpfzab", 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 7648419a1b4d..28124d5db97b 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 @@ -13,16 +13,16 @@ public final class ChaosTargetSelectorTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ChaosTargetSelector model = BinaryData.fromString( - "{\"type\":\"ChaosTargetSelector\",\"id\":\"wutttxfvjrbi\",\"filter\":{\"type\":\"ChaosTargetFilter\"}}") + "{\"type\":\"ChaosTargetSelector\",\"id\":\"qwalmuzyoxaepd\",\"filter\":{\"type\":\"ChaosTargetFilter\"}}") .toObject(ChaosTargetSelector.class); - Assertions.assertEquals("wutttxfvjrbi", model.id()); + Assertions.assertEquals("qwalmuzyoxaepd", model.id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ChaosTargetSelector model - = new ChaosTargetSelector().withId("wutttxfvjrbi").withFilter(new ChaosTargetFilter()); + = new ChaosTargetSelector().withId("qwalmuzyoxaepd").withFilter(new ChaosTargetFilter()); model = BinaryData.fromObject(model).toObject(ChaosTargetSelector.class); - Assertions.assertEquals("wutttxfvjrbi", model.id()); + Assertions.assertEquals("qwalmuzyoxaepd", 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 9c5a9728ae11..2643592daba1 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,16 +12,16 @@ public final class ChaosTargetSimpleFilterParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ChaosTargetSimpleFilterParameters model - = BinaryData.fromString("{\"zones\":[\"rbu\"]}").toObject(ChaosTargetSimpleFilterParameters.class); - Assertions.assertEquals("rbu", model.zones().get(0)); + ChaosTargetSimpleFilterParameters model = BinaryData.fromString("{\"zones\":[\"kfplgmgsxnk\",\"zkd\"]}") + .toObject(ChaosTargetSimpleFilterParameters.class); + Assertions.assertEquals("kfplgmgsxnk", model.zones().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ChaosTargetSimpleFilterParameters model - = new ChaosTargetSimpleFilterParameters().withZones(Arrays.asList("rbu")); + = new ChaosTargetSimpleFilterParameters().withZones(Arrays.asList("kfplgmgsxnk", "zkd")); model = BinaryData.fromObject(model).toObject(ChaosTargetSimpleFilterParameters.class); - Assertions.assertEquals("rbu", model.zones().get(0)); + Assertions.assertEquals("kfplgmgsxnk", 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 4f1bc5a8e39c..a13921b10766 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\":[\"uqqkpik\",\"drgvtqagn\",\"uynhijg\",\"mebf\"]}}") - .toObject(ChaosTargetSimpleFilter.class); - Assertions.assertEquals("uqqkpik", model.parameters().zones().get(0)); + ChaosTargetSimpleFilter model + = BinaryData.fromString("{\"type\":\"Simple\",\"parameters\":{\"zones\":[\"yuguosvmkfssx\"]}}") + .toObject(ChaosTargetSimpleFilter.class); + Assertions.assertEquals("yuguosvmkfssx", 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("uqqkpik", "drgvtqagn", "uynhijg", "mebf"))); + ChaosTargetSimpleFilter model = new ChaosTargetSimpleFilter() + .withParameters(new ChaosTargetSimpleFilterParameters().withZones(Arrays.asList("yuguosvmkfssx"))); model = BinaryData.fromObject(model).toObject(ChaosTargetSimpleFilter.class); - Assertions.assertEquals("uqqkpik", model.parameters().zones().get(0)); + Assertions.assertEquals("yuguosvmkfssx", model.parameters().zones().get(0)); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ConfigurationFiltersTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ConfigurationFiltersTests.java deleted file mode 100644 index 43a4ef38f704..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ConfigurationFiltersTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.chaos.models.ConfigurationFilters; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ConfigurationFiltersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ConfigurationFilters model = BinaryData.fromString( - "{\"locations\":[\"aglqivbgkcvkh\",\"zvuqdflvon\",\"yp\"],\"zones\":[\"bcpzgpxtivh\",\"knidib\",\"qjxgpnrhgovfgp\"],\"physicalZones\":[\"mhha\",\"wjrmzvuporqzd\"]}") - .toObject(ConfigurationFilters.class); - Assertions.assertEquals("aglqivbgkcvkh", model.locations().get(0)); - Assertions.assertEquals("bcpzgpxtivh", model.zones().get(0)); - Assertions.assertEquals("mhha", model.physicalZones().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ConfigurationFilters model - = new ConfigurationFilters().withLocations(Arrays.asList("aglqivbgkcvkh", "zvuqdflvon", "yp")) - .withZones(Arrays.asList("bcpzgpxtivh", "knidib", "qjxgpnrhgovfgp")) - .withPhysicalZones(Arrays.asList("mhha", "wjrmzvuporqzd")); - model = BinaryData.fromObject(model).toObject(ConfigurationFilters.class); - Assertions.assertEquals("aglqivbgkcvkh", model.locations().get(0)); - Assertions.assertEquals("bcpzgpxtivh", model.zones().get(0)); - Assertions.assertEquals("mhha", model.physicalZones().get(0)); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CustomerDataStoragePropertiesTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CustomerDataStoragePropertiesTests.java deleted file mode 100644 index 0d02725ccdc1..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/CustomerDataStoragePropertiesTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.chaos.models.CustomerDataStorageProperties; -import org.junit.jupiter.api.Assertions; - -public final class CustomerDataStoragePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CustomerDataStorageProperties model = BinaryData - .fromString("{\"storageAccountResourceId\":\"cvpnazzmhjrunmpx\",\"blobContainerName\":\"dbhrbnlankxm\"}") - .toObject(CustomerDataStorageProperties.class); - Assertions.assertEquals("cvpnazzmhjrunmpx", model.storageAccountResourceId()); - Assertions.assertEquals("dbhrbnlankxm", model.blobContainerName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CustomerDataStorageProperties model - = new CustomerDataStorageProperties().withStorageAccountResourceId("cvpnazzmhjrunmpx") - .withBlobContainerName("dbhrbnlankxm"); - model = BinaryData.fromObject(model).toObject(CustomerDataStorageProperties.class); - Assertions.assertEquals("cvpnazzmhjrunmpx", model.storageAccountResourceId()); - Assertions.assertEquals("dbhrbnlankxm", model.blobContainerName()); - } -} 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 2ce1a2756767..2c2953153a60 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 @@ -13,17 +13,17 @@ public final class DelayActionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DelayAction model - = BinaryData.fromString("{\"type\":\"delay\",\"duration\":\"PT6H5M50S\",\"name\":\"kymuctqhjfbebr\"}") + = BinaryData.fromString("{\"type\":\"delay\",\"duration\":\"PT62H42M11S\",\"name\":\"kzywbiex\"}") .toObject(DelayAction.class); - Assertions.assertEquals("kymuctqhjfbebr", model.name()); - Assertions.assertEquals(Duration.parse("PT6H5M50S"), model.duration()); + Assertions.assertEquals("kzywbiex", model.name()); + Assertions.assertEquals(Duration.parse("PT62H42M11S"), model.duration()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - DelayAction model = new DelayAction().withName("kymuctqhjfbebr").withDuration(Duration.parse("PT6H5M50S")); + DelayAction model = new DelayAction().withName("kzywbiex").withDuration(Duration.parse("PT62H42M11S")); model = BinaryData.fromObject(model).toObject(DelayAction.class); - Assertions.assertEquals("kymuctqhjfbebr", model.name()); - Assertions.assertEquals(Duration.parse("PT6H5M50S"), model.duration()); + Assertions.assertEquals("kzywbiex", model.name()); + Assertions.assertEquals(Duration.parse("PT62H42M11S"), model.duration()); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/DiscoveredResourceInnerTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/DiscoveredResourceInnerTests.java deleted file mode 100644 index 42260af1848c..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/DiscoveredResourceInnerTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.chaos.fluent.models.DiscoveredResourceInner; - -public final class DiscoveredResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiscoveredResourceInner model = BinaryData.fromString( - "{\"properties\":{\"namespace\":\"jh\",\"resourceName\":\"mgixhcmavmqfou\",\"resourceType\":\"or\",\"fullyQualifiedIdentifier\":\"cgyypro\",\"discoveredAt\":\"2021-06-17T04:22:53Z\",\"scope\":\"ypundmbxhugc\"},\"id\":\"k\",\"name\":\"vlgo\",\"type\":\"bmftpmdt\"}") - .toObject(DiscoveredResourceInner.class); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/DiscoveredResourceListResultTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/DiscoveredResourceListResultTests.java deleted file mode 100644 index b3522d6344a1..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/DiscoveredResourceListResultTests.java +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.chaos.implementation.models.DiscoveredResourceListResult; -import org.junit.jupiter.api.Assertions; - -public final class DiscoveredResourceListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiscoveredResourceListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"namespace\":\"cw\",\"resourceName\":\"hohsd\",\"resourceType\":\"mcdzsufcohdxbz\",\"fullyQualifiedIdentifier\":\"mcmuapc\",\"discoveredAt\":\"2021-08-04T10:09:35Z\",\"scope\":\"dbevwqqxeysko\"},\"id\":\"zinkfkbgbzbowxeq\",\"name\":\"clj\",\"type\":\"ygvkzqkjj\"},{\"properties\":{\"namespace\":\"kbzefezrxcczurt\",\"resourceName\":\"e\",\"resourceType\":\"pqxbkwvzgnzvdf\",\"fullyQualifiedIdentifier\":\"zdix\",\"discoveredAt\":\"2021-06-11T17:56:37Z\",\"scope\":\"q\"},\"id\":\"odawopqhewjptmcg\",\"name\":\"bostzel\",\"type\":\"dlat\"},{\"properties\":{\"namespace\":\"mzlbiojlvfhrb\",\"resourceName\":\"pn\",\"resourceType\":\"qvcww\",\"fullyQualifiedIdentifier\":\"yurmochpprprs\",\"discoveredAt\":\"2021-04-15T20:59:55Z\",\"scope\":\"okayzejnhlbkp\"},\"id\":\"pcpil\",\"name\":\"hahzvechndbnwi\",\"type\":\"hol\"},{\"properties\":{\"namespace\":\"jwiuubwefqsfapaq\",\"resourceName\":\"ferr\",\"resourceType\":\"wexjkmfxapjwogq\",\"fullyQualifiedIdentifier\":\"nobpudcdabtqwpw\",\"discoveredAt\":\"2021-08-19T12:15:22Z\",\"scope\":\"wbzasqbuclj\"},\"id\":\"yexaoguy\",\"name\":\"i\",\"type\":\"ids\"}],\"nextLink\":\"ultxijjumfq\"}") - .toObject(DiscoveredResourceListResult.class); - Assertions.assertEquals("ultxijjumfq", model.nextLink()); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/DiscoveredResourcePropertiesTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/DiscoveredResourcePropertiesTests.java deleted file mode 100644 index 2240a275d19b..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/DiscoveredResourcePropertiesTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.chaos.models.DiscoveredResourceProperties; - -public final class DiscoveredResourcePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiscoveredResourceProperties model = BinaryData.fromString( - "{\"namespace\":\"fjltfvnzcyjtotp\",\"resourceName\":\"opv\",\"resourceType\":\"bdb\",\"fullyQualifiedIdentifier\":\"qgqqihedsvqwthmk\",\"discoveredAt\":\"2021-06-02T15:24:18Z\",\"scope\":\"bcysih\"}") - .toObject(DiscoveredResourceProperties.class); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/DiscoveredResourcesGetWithResponseMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/DiscoveredResourcesGetWithResponseMockTests.java deleted file mode 100644 index b9c4410a19ed..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/DiscoveredResourcesGetWithResponseMockTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.chaos.ChaosManager; -import com.azure.resourcemanager.chaos.models.DiscoveredResource; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DiscoveredResourcesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"namespace\":\"qey\",\"resourceName\":\"gltygxhqfgq\",\"resourceType\":\"ayejsxtlgflwfgz\",\"fullyQualifiedIdentifier\":\"iucijjcea\",\"discoveredAt\":\"2021-05-19T19:26:59Z\",\"scope\":\"ijjj\"},\"id\":\"va\",\"name\":\"caszk\",\"type\":\"xk\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ChaosManager manager = ChaosManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - DiscoveredResource response = manager.discoveredResources() - .getWithResponse("yngydgrpxncaki", "aondjrkclamgg", "vlmfej", com.azure.core.util.Context.NONE) - .getValue(); - - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/DiscoveredResourcesListByWorkspaceMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/DiscoveredResourcesListByWorkspaceMockTests.java deleted file mode 100644 index d3f2fe8dd175..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/DiscoveredResourcesListByWorkspaceMockTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.chaos.ChaosManager; -import com.azure.resourcemanager.chaos.models.DiscoveredResource; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DiscoveredResourcesListByWorkspaceMockTests { - @Test - public void testListByWorkspace() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"namespace\":\"gqogjwpindedva\",\"resourceName\":\"bxbhmedeilbj\",\"resourceType\":\"wfcfxzirzz\",\"fullyQualifiedIdentifier\":\"hvwyp\",\"discoveredAt\":\"2021-10-10T22:00:34Z\",\"scope\":\"u\"},\"id\":\"slczwciidjsllf\",\"name\":\"yvdmvx\",\"type\":\"dqacfrgnawbabgf\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ChaosManager manager = ChaosManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PagedIterable response - = manager.discoveredResources().listByWorkspace("ccxetyvkun", "ignohi", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/EntraIdentityTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/EntraIdentityTests.java deleted file mode 100644 index 3f179c6b4579..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/EntraIdentityTests.java +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.chaos.models.EntraIdentity; - -public final class EntraIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EntraIdentity model - = BinaryData.fromString("{\"objectId\":\"ky\",\"tenantId\":\"cxcjxgry\"}").toObject(EntraIdentity.class); - } -} 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 d1503f06bd83..793a447bbc17 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 @@ -11,7 +11,7 @@ public final class ExperimentExecutionDetailsInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExperimentExecutionDetailsInner model = BinaryData.fromString( - "{\"type\":\"wjmy\",\"id\":\"dsslswt\",\"name\":\"eriofzpyqs\",\"properties\":{\"status\":\"abnetshh\",\"startedAt\":\"2021-03-13T20:20:01Z\",\"stoppedAt\":\"2021-04-16T09:40:18Z\",\"provisioningState\":\"Failed\",\"failureReason\":\"wiwubm\",\"lastActionAt\":\"2021-05-28T18:40:12Z\",\"runInformation\":{\"steps\":[{\"stepName\":\"nkww\",\"stepId\":\"pjflcxogao\",\"status\":\"nzmnsikvm\",\"branches\":[{}]},{\"stepName\":\"qqkdltfzxmhhvhgu\",\"stepId\":\"odkwobd\",\"status\":\"xtibqdxbxwakbog\",\"branches\":[{},{},{}]},{\"stepName\":\"lkzgxhuriplbp\",\"stepId\":\"xunkbebxmubyynt\",\"status\":\"rbqtkoie\",\"branches\":[{}]}]}}}") + "{\"type\":\"hxg\",\"id\":\"rmgucnap\",\"name\":\"eoellwptfdygp\",\"properties\":{\"status\":\"uaceopzfqrhhu\",\"startedAt\":\"2021-05-07T00:48:34Z\",\"stoppedAt\":\"2021-03-20T16:48:49Z\",\"failureReason\":\"qeqxo\",\"lastActionAt\":\"2021-06-06T08:14:27Z\",\"runInformation\":{\"steps\":[{\"stepName\":\"ctobg\",\"stepId\":\"dmoizpostmg\",\"status\":\"fbunrmfqjhhk\",\"branches\":[{},{},{},{}]},{\"stepName\":\"jy\",\"stepId\":\"hx\",\"status\":\"yngudivk\",\"branches\":[{},{}]}]}}}") .toObject(ExperimentExecutionDetailsInner.class); } } 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 9ca088f1ac5c..c77778ecffd3 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 @@ -11,7 +11,7 @@ public final class ExperimentExecutionDetailsPropertiesRunInformationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExperimentExecutionDetailsPropertiesRunInformation model = BinaryData.fromString( - "{\"steps\":[{\"stepName\":\"szdtmhrkwof\",\"stepId\":\"voqacpiexpbt\",\"status\":\"wbwo\",\"branches\":[{\"branchName\":\"shrtdtkcnqxwb\",\"branchId\":\"kulpiujwaasi\",\"status\":\"i\",\"actions\":[{},{},{}]},{\"branchName\":\"uqerpqlpqwc\",\"branchId\":\"uqgbdbutauvfbt\",\"status\":\"whhmhykojo\",\"actions\":[{},{}]}]},{\"stepName\":\"nd\",\"stepId\":\"ichkoymkcdyhb\",\"status\":\"kpw\",\"branches\":[{\"branchName\":\"novvqfovljxy\",\"branchId\":\"uwsyrsndsytgadg\",\"status\":\"aeaeneqnzarrw\",\"actions\":[{}]},{\"branchName\":\"ijfqkacewiipfp\",\"branchId\":\"ji\",\"status\":\"wifto\",\"actions\":[{},{},{},{}]},{\"branchName\":\"puvks\",\"branchId\":\"lsa\",\"status\":\"ynfs\",\"actions\":[{},{},{}]}]},{\"stepName\":\"ph\",\"stepId\":\"pxodlqiyntorzih\",\"status\":\"osjswsr\",\"branches\":[{\"branchName\":\"zrpzb\",\"branchId\":\"ckqqzqioxiysui\",\"status\":\"ynkedyatrwyhqmib\",\"actions\":[{}]},{\"branchName\":\"itsmypyyn\",\"branchId\":\"dpumnzgmw\",\"status\":\"mabiknsorgjhxb\",\"actions\":[{},{}]},{\"branchName\":\"wwrlkdmtncv\",\"branchId\":\"otllxdyhgsyo\",\"status\":\"gjltdtbnnhado\",\"actions\":[{},{},{}]},{\"branchName\":\"vcikhnvpamqgx\",\"branchId\":\"u\",\"status\":\"ik\",\"actions\":[{},{},{},{}]}]},{\"stepName\":\"xkalla\",\"stepId\":\"elwuipi\",\"status\":\"jzkzi\",\"branches\":[{\"branchName\":\"c\",\"branchId\":\"y\",\"status\":\"yrnxxmueedn\",\"actions\":[{},{}]},{\"branchName\":\"stkwqqtch\",\"branchId\":\"lmfmtdaay\",\"status\":\"v\",\"actions\":[{},{},{},{}]}]}]}") + "{\"steps\":[{\"stepName\":\"u\",\"stepId\":\"auwzizxbmpgc\",\"status\":\"fuzmuvpbtt\",\"branches\":[{\"branchName\":\"rp\",\"branchId\":\"ebmnzbtbhjpglk\",\"status\":\"ohdneuel\",\"actions\":[{}]},{\"branchName\":\"dyhtozfikdowwquu\",\"branchId\":\"zx\",\"status\":\"vithh\",\"actions\":[{}]},{\"branchName\":\"osggbhc\",\"branchId\":\"fwdsj\",\"status\":\"aljutiiswac\",\"actions\":[{}]},{\"branchName\":\"k\",\"branchId\":\"ewkfvhqcrai\",\"status\":\"pnppfuf\",\"actions\":[{},{},{}]}]},{\"stepName\":\"mh\",\"stepId\":\"xyjrxsagafcnih\",\"status\":\"qapnedgfbcv\",\"branches\":[{\"branchName\":\"vpk\",\"branchId\":\"dcvd\",\"status\":\"vo\",\"actions\":[{},{}]}]},{\"stepName\":\"tbobz\",\"stepId\":\"pcjwv\",\"status\":\"dldwmgxc\",\"branches\":[{\"branchName\":\"pmutwuo\",\"branchId\":\"rpkhjwn\",\"status\":\"qsluicp\",\"actions\":[{}]},{\"branchName\":\"zzlvmbmpaxmodfv\",\"branchId\":\"fy\",\"status\":\"bpfvm\",\"actions\":[{},{}]},{\"branchName\":\"fouyf\",\"branchId\":\"akcp\",\"status\":\"yzvqt\",\"actions\":[{}]}]}]}") .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 fa7a1da7900d..e82bb9f556fa 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 @@ -11,7 +11,7 @@ public final class ExperimentExecutionDetailsPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExperimentExecutionDetailsProperties model = BinaryData.fromString( - "{\"status\":\"tgqr\",\"startedAt\":\"2021-06-26T20:58:29Z\",\"stoppedAt\":\"2021-07-23T15:24:06Z\",\"provisioningState\":\"Succeeded\",\"failureReason\":\"uwz\",\"lastActionAt\":\"2021-10-11T08:08:51Z\",\"runInformation\":{\"steps\":[{\"stepName\":\"cjefuzmu\",\"stepId\":\"bttdumorppxe\",\"status\":\"nzbtbhj\",\"branches\":[{\"branchName\":\"fgohdneuelfphs\",\"branchId\":\"htozfikdow\",\"status\":\"uuvxz\",\"actions\":[{},{},{},{}]}]},{\"stepName\":\"ithhqzon\",\"stepId\":\"ggbhcohfwds\",\"status\":\"ka\",\"branches\":[{\"branchName\":\"iiswacffgdkzze\",\"branchId\":\"fvhqc\",\"status\":\"ilvpnppfuflrwd\",\"actions\":[{},{}]},{\"branchName\":\"xyjrxsagafcnih\",\"branchId\":\"qapnedgfbcv\",\"status\":\"vq\",\"actions\":[{},{},{},{}]},{\"branchName\":\"qdcvdrhvoo\",\"branchId\":\"otbobzdopcj\",\"status\":\"nhdldwmgxcx\",\"actions\":[{},{},{},{}]}]},{\"stepName\":\"mutwuoe\",\"stepId\":\"pkhjwni\",\"status\":\"sluicpdggkzz\",\"branches\":[{\"branchName\":\"mpaxmodfvuefywsb\",\"branchId\":\"vmwy\",\"status\":\"fouyf\",\"actions\":[{}]},{\"branchName\":\"cpwi\",\"branchId\":\"vqtmnub\",\"status\":\"kpzksmondjmq\",\"actions\":[{},{},{},{}]},{\"branchName\":\"pomgkopkwhojvp\",\"branchId\":\"qgxy\",\"status\":\"ocmbqfqvmkcxoza\",\"actions\":[{},{},{}]},{\"branchName\":\"lxprglyatddckcbc\",\"branchId\":\"jrjxgciqibrhosx\",\"status\":\"qrhzoymibmrqyib\",\"actions\":[{},{}]}]}]}}") + "{\"status\":\"bxqz\",\"startedAt\":\"2021-10-26T13:42:02Z\",\"stoppedAt\":\"2021-01-16T06:43:01Z\",\"failureReason\":\"uvjfdxxive\",\"lastActionAt\":\"2021-08-28T01:45:57Z\",\"runInformation\":{\"steps\":[{\"stepName\":\"tdo\",\"stepId\":\"cbxvwvxyslqbh\",\"status\":\"xoblytkbl\",\"branches\":[{\"branchName\":\"wwfbkrvrnsvshq\",\"branchId\":\"hxcr\",\"status\":\"fovasr\",\"actions\":[{}]},{\"branchName\":\"bhsqfsubcgjbirxb\",\"branchId\":\"bsrfbj\",\"status\":\"twss\",\"actions\":[{},{},{}]},{\"branchName\":\"pvjzbe\",\"branchId\":\"l\",\"status\":\"nfqqnvwp\",\"actions\":[{},{},{}]},{\"branchName\":\"ruoujmk\",\"branchId\":\"hwqytj\",\"status\":\"bnw\",\"actions\":[{},{},{},{}]}]},{\"stepName\":\"drjervnaenqpehin\",\"stepId\":\"ygmi\",\"status\":\"hnzdndslgnayqi\",\"branches\":[{\"branchName\":\"uhavhql\",\"branchId\":\"humaqolbgyc\",\"status\":\"iertgccymvaolp\",\"actions\":[{},{}]},{\"branchName\":\"lfmmdnbbglzpswi\",\"branchId\":\"mcwyhzdxssadb\",\"status\":\"nvdfznuda\",\"actions\":[{},{}]},{\"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\":[{}]}]}]}}") .toObject(ExperimentExecutionDetailsProperties.class); } } 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 8191eaf902c2..84a5f247b7b1 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 @@ -11,7 +11,7 @@ public final class ExperimentExecutionInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExperimentExecutionInner model = BinaryData.fromString( - "{\"properties\":{\"status\":\"ewwwfbkrvrnsv\",\"startedAt\":\"2021-04-19T21:02:09Z\",\"stoppedAt\":\"2021-02-05T19:22:33Z\",\"provisioningState\":\"Running\"},\"id\":\"rsbfovasrruvw\",\"name\":\"hsqfsubcgjbirxbp\",\"type\":\"bsrfbj\"}") + "{\"properties\":{\"status\":\"bxwyjsflhhcaa\",\"startedAt\":\"2021-08-06T05:51:03Z\",\"stoppedAt\":\"2021-03-25T19:19:56Z\"},\"id\":\"sxyawjoyaqcs\",\"name\":\"yjpkiidzyexz\",\"type\":\"eli\"}") .toObject(ExperimentExecutionInner.class); } } 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 0dbb764b3721..b1a978614832 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 @@ -12,8 +12,8 @@ public final class ExperimentExecutionListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExperimentExecutionListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"status\":\"xilzznf\",\"startedAt\":\"2021-04-18T09:57:36Z\",\"stoppedAt\":\"2021-08-05T13:05:43Z\",\"provisioningState\":\"Canceled\"},\"id\":\"taruoujmkcj\",\"name\":\"wqytjrybnwjewgdr\",\"type\":\"ervnaenqpehi\"},{\"properties\":{\"status\":\"ygmi\",\"startedAt\":\"2021-05-30T21:32:13Z\",\"stoppedAt\":\"2021-09-13T22:02:43Z\",\"provisioningState\":\"Canceled\"},\"id\":\"sl\",\"name\":\"nayqi\",\"type\":\"ynduha\"},{\"properties\":{\"status\":\"lkthu\",\"startedAt\":\"2021-10-13T06:47:40Z\",\"stoppedAt\":\"2021-06-27T19:43:46Z\",\"provisioningState\":\"Failed\"},\"id\":\"cdui\",\"name\":\"r\",\"type\":\"gccymvaolpssl\"},{\"properties\":{\"status\":\"mmdnbbglzps\",\"startedAt\":\"2021-11-30T08:30:44Z\",\"stoppedAt\":\"2021-07-04T16:25:15Z\",\"provisioningState\":\"Updating\"},\"id\":\"hzdxssadbzm\",\"name\":\"vdfznudaodvxzb\",\"type\":\"cblylpstdbhhxsr\"}],\"nextLink\":\"zucerscdntnev\"}") + "{\"value\":[{\"properties\":{\"status\":\"xknalaulppg\",\"startedAt\":\"2021-03-08T22:58:09Z\",\"stoppedAt\":\"2021-08-03T06:29:07Z\"},\"id\":\"pnyiropuhp\",\"name\":\"gvpgy\",\"type\":\"gqgitxmedjvcsl\"}],\"nextLink\":\"qwwncw\"}") .toObject(ExperimentExecutionListResult.class); - Assertions.assertEquals("zucerscdntnev", model.nextLink()); + Assertions.assertEquals("qwwncw", model.nextLink()); } } 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 c5e25513036c..d37e75b3413c 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,8 +10,9 @@ public final class ExperimentExecutionPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ExperimentExecutionProperties model = BinaryData.fromString( - "{\"status\":\"twss\",\"startedAt\":\"2021-06-01T18:34:35Z\",\"stoppedAt\":\"2021-03-22T01:55:17Z\",\"provisioningState\":\"Succeeded\"}") + ExperimentExecutionProperties model = BinaryData + .fromString( + "{\"status\":\"nr\",\"startedAt\":\"2021-05-07T02:19:01Z\",\"stoppedAt\":\"2021-01-29T16:29:48Z\"}") .toObject(ExperimentExecutionProperties.class); } } 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 8b6d12b91db9..0ec62dd783c4 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 @@ -11,7 +11,6 @@ import com.azure.resourcemanager.chaos.models.ChaosExperimentStep; import com.azure.resourcemanager.chaos.models.ChaosTargetFilter; import com.azure.resourcemanager.chaos.models.ChaosTargetSelector; -import com.azure.resourcemanager.chaos.models.CustomerDataStorageProperties; import com.azure.resourcemanager.chaos.models.ManagedServiceIdentityType; import com.azure.resourcemanager.chaos.models.ResourceIdentity; import com.azure.resourcemanager.chaos.models.UserAssignedIdentity; @@ -24,87 +23,67 @@ public final class ExperimentInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExperimentInner model = BinaryData.fromString( - "{\"identity\":{\"principalId\":\"qmi\",\"tenantId\":\"thz\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"qfbow\":{\"principalId\":\"abhjybi\",\"clientId\":\"h\"},\"rcgyn\":{\"principalId\":\"anyktzlcuiywg\",\"clientId\":\"wgndrvynhzgpp\"},\"qjqabcypmivkwl\":{\"principalId\":\"cpecfvmmcoofs\",\"clientId\":\"zevgb\"}}},\"properties\":{\"provisioningState\":\"Deleting\",\"steps\":[{\"name\":\"c\",\"branches\":[{\"name\":\"nfnbacfionlebxe\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"gtzxdpn\"}]},{\"name\":\"bqqwxrj\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"al\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"nwsubisnj\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"mpmngnzscxaqwoo\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"hcbonqvpkvlr\"}]}]},{\"name\":\"njeaseipheofloke\",\"branches\":[{\"name\":\"ienjbdlwtgr\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"djpjumasxazjpq\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"e\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"ualhbxxhejj\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"zvdudgwdslfhotwm\"}]}]},{\"name\":\"ynpwlbj\",\"branches\":[{\"name\":\"gacftadeh\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"ltyfsop\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"usue\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"nzwdejba\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"orxzdmohctbqvud\"}]},{\"name\":\"xdn\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"vo\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"gujjugwdkcglh\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"lazjdyggdtjixhbk\"}]},{\"name\":\"ofqweykhmenevfye\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"whybcib\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"yvdcsitynnaa\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"dectehfiqsc\"}]},{\"name\":\"eypvhezrkg\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"c\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"refovgmkqsleyyvx\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"qjpkcattpngjcrc\"}]}]},{\"name\":\"zsqpjhvmdajvny\",\"branches\":[{\"name\":\"unqecanoae\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"fhyhltrpmopjmcma\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"u\"}]},{\"name\":\"kthfui\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"odsfcpkvxodpuozm\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"zydagfuaxbezyiuo\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"ktwh\"}]},{\"name\":\"dxwzywqsmbsurexi\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"ryocfsfksymdd\"}]}]}],\"selectors\":[{\"type\":\"ChaosTargetSelector\",\"id\":\"tki\",\"filter\":{\"type\":\"ChaosTargetFilter\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"xhqyudxorrqnb\",\"filter\":{\"type\":\"ChaosTargetFilter\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"czvyifq\",\"filter\":{\"type\":\"ChaosTargetFilter\"}}],\"customerDataStorage\":{\"storageAccountResourceId\":\"vjsllrmvvdfw\",\"blobContainerName\":\"kpnpulexxbczwtr\"}},\"location\":\"iqzbq\",\"tags\":{\"okacspk\":\"ovm\",\"jmflbvvnch\":\"lhzdobp\",\"ajiwkuo\":\"kcciwwzjuqkhr\",\"sauuimj\":\"oskg\"},\"id\":\"vxieduugidyj\",\"name\":\"rfbyaosvexcso\",\"type\":\"pclhocohslk\"}") + "{\"identity\":{\"principalId\":\"bqqwxrj\",\"tenantId\":\"al\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"ochcbonqvpkvl\":{\"principalId\":\"bisnja\",\"clientId\":\"mngnzscxaqw\"}}},\"properties\":{\"provisioningState\":\"Deleting\",\"steps\":[{\"name\":\"ea\",\"branches\":[{\"name\":\"ipheoflokeyyien\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"dlwtgrhpdj\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"jumasx\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"zj\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"qyeg\"}]},{\"name\":\"alhbx\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"e\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"jzzvdud\"}]},{\"name\":\"wdslfhotwmcy\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"wlbjnpgacftade\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"xnltyfsoppu\"}]},{\"name\":\"uesnzwdejbavo\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"zdmohctbqvu\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"wxdndnvowgujjug\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"dkcglhsl\"}]}]},{\"name\":\"zj\",\"branches\":[{\"name\":\"ggd\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"ixhbkuofqweykhm\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"n\"}]},{\"name\":\"vfyexfw\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"bcibvyvdcsitynn\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"amdecte\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"f\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"qsc\"}]},{\"name\":\"eypvhezrkg\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"c\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"refovgmkqsleyyvx\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"qjpkcattpngjcrc\"}]}]}],\"selectors\":[{\"type\":\"ChaosTargetSelector\",\"id\":\"sqpjhvmdajvn\",\"filter\":{\"type\":\"ChaosTargetFilter\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"ounqecano\",\"filter\":{\"type\":\"ChaosTargetFilter\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"upfh\",\"filter\":{\"type\":\"ChaosTargetFilter\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"ltrpmopj\",\"filter\":{\"type\":\"ChaosTargetFilter\"}}]},\"location\":\"atuokthfuiu\",\"tags\":{\"zydagfuaxbezyiuo\":\"sfcpkvxodpuozm\",\"dxwzywqsmbsurexi\":\"ktwh\",\"yocf\":\"o\",\"uxh\":\"fksymddystki\"},\"id\":\"yudxorrqnbp\",\"name\":\"czvyifq\",\"type\":\"vkd\"}") .toObject(ExperimentInner.class); - Assertions.assertEquals("iqzbq", model.location()); - Assertions.assertEquals("ovm", model.tags().get("okacspk")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals("c", model.steps().get(0).name()); - Assertions.assertEquals("nfnbacfionlebxe", model.steps().get(0).branches().get(0).name()); - Assertions.assertEquals("gtzxdpn", model.steps().get(0).branches().get(0).actions().get(0).name()); - Assertions.assertEquals("tki", model.selectors().get(0).id()); - Assertions.assertEquals("vjsllrmvvdfw", model.customerDataStorage().storageAccountResourceId()); - Assertions.assertEquals("kpnpulexxbczwtr", model.customerDataStorage().blobContainerName()); + Assertions.assertEquals("atuokthfuiu", model.location()); + Assertions.assertEquals("sfcpkvxodpuozm", model.tags().get("zydagfuaxbezyiuo")); + Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.identity().type()); + Assertions.assertEquals("ea", model.steps().get(0).name()); + Assertions.assertEquals("ipheoflokeyyien", model.steps().get(0).branches().get(0).name()); + Assertions.assertEquals("dlwtgrhpdj", model.steps().get(0).branches().get(0).actions().get(0).name()); + Assertions.assertEquals("sqpjhvmdajvn", model.selectors().get(0).id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ExperimentInner model = new ExperimentInner().withLocation("iqzbq") - .withTags(mapOf("okacspk", "ovm", "jmflbvvnch", "lhzdobp", "ajiwkuo", "kcciwwzjuqkhr", "sauuimj", "oskg")) - .withIdentity(new ResourceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("qfbow", new UserAssignedIdentity(), "rcgyn", - new UserAssignedIdentity(), "qjqabcypmivkwl", new UserAssignedIdentity()))) + ExperimentInner model = new ExperimentInner().withLocation("atuokthfuiu") + .withTags(mapOf("zydagfuaxbezyiuo", "sfcpkvxodpuozm", "dxwzywqsmbsurexi", "ktwh", "yocf", "o", "uxh", + "fksymddystki")) + .withIdentity(new ResourceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf("ochcbonqvpkvl", new UserAssignedIdentity()))) .withSteps(Arrays.asList( - new ChaosExperimentStep().withName("c") + new ChaosExperimentStep().withName("ea") + .withBranches(Arrays.asList(new ChaosExperimentBranch().withName("ipheoflokeyyien") + .withActions(Arrays.asList(new ChaosExperimentAction().withName("dlwtgrhpdj"), + new ChaosExperimentAction().withName("jumasx"), new ChaosExperimentAction().withName("zj"), + new ChaosExperimentAction().withName("qyeg"))), + new ChaosExperimentBranch().withName("alhbx") + .withActions(Arrays.asList(new ChaosExperimentAction().withName("e"), + new ChaosExperimentAction().withName("jzzvdud"))), + new ChaosExperimentBranch().withName("wdslfhotwmcy") + .withActions(Arrays.asList(new ChaosExperimentAction().withName("wlbjnpgacftade"), + new ChaosExperimentAction().withName("xnltyfsoppu"))), + new ChaosExperimentBranch().withName("uesnzwdejbavo") + .withActions(Arrays.asList(new ChaosExperimentAction().withName("zdmohctbqvu"), + new ChaosExperimentAction().withName("wxdndnvowgujjug"), + new ChaosExperimentAction().withName("dkcglhsl"))))), + new ChaosExperimentStep().withName("zj") .withBranches(Arrays.asList( - new ChaosExperimentBranch().withName("nfnbacfionlebxe") - .withActions(Arrays.asList(new ChaosExperimentAction().withName("gtzxdpn"))), - new ChaosExperimentBranch().withName("bqqwxrj") - .withActions(Arrays.asList(new ChaosExperimentAction().withName("al"), - new ChaosExperimentAction().withName("nwsubisnj"), - new ChaosExperimentAction().withName("mpmngnzscxaqwoo"), - new ChaosExperimentAction().withName("hcbonqvpkvlr"))))), - new ChaosExperimentStep().withName("njeaseipheofloke") - .withBranches(Arrays.asList(new ChaosExperimentBranch().withName("ienjbdlwtgr") - .withActions(Arrays.asList(new ChaosExperimentAction().withName("djpjumasxazjpq"), - new ChaosExperimentAction().withName("e"), - new ChaosExperimentAction().withName("ualhbxxhejj"), - new ChaosExperimentAction().withName("zvdudgwdslfhotwm"))))), - new ChaosExperimentStep().withName("ynpwlbj") - .withBranches(Arrays.asList( - new ChaosExperimentBranch().withName("gacftadeh") - .withActions(Arrays.asList(new ChaosExperimentAction().withName("ltyfsop"), - new ChaosExperimentAction().withName("usue"), - new ChaosExperimentAction().withName("nzwdejba"), - new ChaosExperimentAction().withName("orxzdmohctbqvud"))), - new ChaosExperimentBranch().withName("xdn") - .withActions(Arrays.asList(new ChaosExperimentAction().withName("vo"), - new ChaosExperimentAction().withName("gujjugwdkcglh"), - new ChaosExperimentAction().withName("lazjdyggdtjixhbk"))), - new ChaosExperimentBranch().withName("ofqweykhmenevfye") - .withActions(Arrays.asList(new ChaosExperimentAction().withName("whybcib"), - new ChaosExperimentAction().withName("yvdcsitynnaa"), - new ChaosExperimentAction().withName("dectehfiqsc"))), + new ChaosExperimentBranch().withName("ggd") + .withActions(Arrays.asList(new ChaosExperimentAction().withName("ixhbkuofqweykhm"), + new ChaosExperimentAction().withName("n"))), + new ChaosExperimentBranch().withName("vfyexfw") + .withActions(Arrays.asList(new ChaosExperimentAction().withName("bcibvyvdcsitynn"), + new ChaosExperimentAction().withName("amdecte"), + new ChaosExperimentAction().withName("f"), + new ChaosExperimentAction().withName("qsc"))), new ChaosExperimentBranch().withName("eypvhezrkg") .withActions(Arrays.asList(new ChaosExperimentAction().withName("c"), new ChaosExperimentAction().withName("refovgmkqsleyyvx"), - new ChaosExperimentAction().withName("qjpkcattpngjcrc"))))), - new ChaosExperimentStep().withName("zsqpjhvmdajvny") - .withBranches(Arrays.asList( - new ChaosExperimentBranch().withName("unqecanoae") - .withActions(Arrays.asList(new ChaosExperimentAction().withName("fhyhltrpmopjmcma"), - new ChaosExperimentAction().withName("u"))), - new ChaosExperimentBranch().withName("kthfui") - .withActions(Arrays.asList(new ChaosExperimentAction().withName("odsfcpkvxodpuozm"), - new ChaosExperimentAction().withName("zydagfuaxbezyiuo"), - new ChaosExperimentAction().withName("ktwh"))), - new ChaosExperimentBranch().withName("dxwzywqsmbsurexi") - .withActions(Arrays.asList(new ChaosExperimentAction().withName("ryocfsfksymdd"))))))) - .withSelectors(Arrays.asList(new ChaosTargetSelector().withId("tki").withFilter(new ChaosTargetFilter()), - new ChaosTargetSelector().withId("xhqyudxorrqnb").withFilter(new ChaosTargetFilter()), - new ChaosTargetSelector().withId("czvyifq").withFilter(new ChaosTargetFilter()))) - .withCustomerDataStorage(new CustomerDataStorageProperties().withStorageAccountResourceId("vjsllrmvvdfw") - .withBlobContainerName("kpnpulexxbczwtr")); + new ChaosExperimentAction().withName("qjpkcattpngjcrc"))))))) + .withSelectors( + Arrays.asList(new ChaosTargetSelector().withId("sqpjhvmdajvn").withFilter(new ChaosTargetFilter()), + new ChaosTargetSelector().withId("ounqecano").withFilter(new ChaosTargetFilter()), + new ChaosTargetSelector().withId("upfh").withFilter(new ChaosTargetFilter()), + new ChaosTargetSelector().withId("ltrpmopj").withFilter(new ChaosTargetFilter()))); model = BinaryData.fromObject(model).toObject(ExperimentInner.class); - Assertions.assertEquals("iqzbq", model.location()); - Assertions.assertEquals("ovm", model.tags().get("okacspk")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals("c", model.steps().get(0).name()); - Assertions.assertEquals("nfnbacfionlebxe", model.steps().get(0).branches().get(0).name()); - Assertions.assertEquals("gtzxdpn", model.steps().get(0).branches().get(0).actions().get(0).name()); - Assertions.assertEquals("tki", model.selectors().get(0).id()); - Assertions.assertEquals("vjsllrmvvdfw", model.customerDataStorage().storageAccountResourceId()); - Assertions.assertEquals("kpnpulexxbczwtr", model.customerDataStorage().blobContainerName()); + Assertions.assertEquals("atuokthfuiu", model.location()); + Assertions.assertEquals("sfcpkvxodpuozm", model.tags().get("zydagfuaxbezyiuo")); + Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.identity().type()); + Assertions.assertEquals("ea", model.steps().get(0).name()); + Assertions.assertEquals("ipheoflokeyyien", model.steps().get(0).branches().get(0).name()); + Assertions.assertEquals("dlwtgrhpdj", model.steps().get(0).branches().get(0).actions().get(0).name()); + Assertions.assertEquals("sqpjhvmdajvn", model.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/ExperimentListResultTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExperimentListResultTests.java index 58f69a0c6dfe..b43f1d5d0f2a 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 @@ -13,16 +13,14 @@ public final class ExperimentListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExperimentListResult model = BinaryData.fromString( - "{\"value\":[{\"identity\":{\"principalId\":\"xbniwdjs\",\"tenantId\":\"tsdbpgn\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"tyq\":{\"principalId\":\"pzxbz\",\"clientId\":\"zabglcuhxwt\"}}},\"properties\":{\"provisioningState\":\"Failed\",\"steps\":[{\"name\":\"bovpl\",\"branches\":[{\"name\":\"bhvgy\",\"actions\":[]},{\"name\":\"gu\",\"actions\":[]},{\"name\":\"svmkfssxquk\",\"actions\":[]}]},{\"name\":\"fpl\",\"branches\":[{\"name\":\"gsxnkjzkdeslpv\",\"actions\":[]}]},{\"name\":\"opwi\",\"branches\":[{\"name\":\"ghxpkdw\",\"actions\":[]},{\"name\":\"baiuebbaumny\",\"actions\":[]}]},{\"name\":\"upedeojnabckhs\",\"branches\":[{\"name\":\"xpsiebtfhvpes\",\"actions\":[]}]}],\"selectors\":[{\"type\":\"ChaosTargetSelector\",\"id\":\"skrdqmhjj\",\"filter\":{\"type\":\"ChaosTargetFilter\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"tldwkyzxuutk\",\"filter\":{\"type\":\"ChaosTargetFilter\"}}],\"customerDataStorage\":{\"storageAccountResourceId\":\"cwsvlxotog\",\"blobContainerName\":\"rupqsxvnmicy\"}},\"location\":\"ceoveilovno\",\"tags\":{\"bkc\":\"jfcn\"},\"id\":\"x\",\"name\":\"hbttkphyw\",\"type\":\"nv\"},{\"identity\":{\"principalId\":\"qnermclfplphoxu\",\"tenantId\":\"rpabg\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"zwfqkqujidsuyon\":{\"principalId\":\"jta\",\"clientId\":\"ugxywpmueef\"}}},\"properties\":{\"provisioningState\":\"Creating\",\"steps\":[{\"name\":\"aocqxtccmgy\",\"branches\":[{\"name\":\"xy\",\"actions\":[]}]},{\"name\":\"lmoyrx\",\"branches\":[{\"name\":\"fudwpznt\",\"actions\":[]},{\"name\":\"hdzhlrqj\",\"actions\":[]},{\"name\":\"hckfrlhrx\",\"actions\":[]},{\"name\":\"bkyvp\",\"actions\":[]}]},{\"name\":\"ca\",\"branches\":[{\"name\":\"z\",\"actions\":[]},{\"name\":\"p\",\"actions\":[]},{\"name\":\"kafkuwbcrnwbm\",\"actions\":[]}]}],\"selectors\":[{\"type\":\"ChaosTargetSelector\",\"id\":\"hseyvju\",\"filter\":{\"type\":\"ChaosTargetFilter\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"tslhspkdeem\",\"filter\":{\"type\":\"ChaosTargetFilter\"}}],\"customerDataStorage\":{\"storageAccountResourceId\":\"xagkvtmelmqkrh\",\"blobContainerName\":\"vljua\"}},\"location\":\"quhcdhmduala\",\"tags\":{\"vxpvgomz\":\"pvfadmwsrcr\"},\"id\":\"fmisg\",\"name\":\"bnbbeldawkz\",\"type\":\"ali\"},{\"identity\":{\"principalId\":\"qhakauhashsf\",\"tenantId\":\"osow\",\"type\":\"None\",\"userAssignedIdentities\":{\"wfvovbv\":{\"principalId\":\"i\",\"clientId\":\"ooxdjebwpuc\"},\"wjue\":{\"principalId\":\"uecivyhz\",\"clientId\":\"uojgj\"},\"nrjawgqwg\":{\"principalId\":\"twm\",\"clientId\":\"ytdxwit\"},\"bkpyc\":{\"principalId\":\"ni\",\"clientId\":\"x\"}}},\"properties\":{\"provisioningState\":\"Creating\",\"steps\":[{\"name\":\"ndnhj\",\"branches\":[{\"name\":\"uwhvylwzbtdhxujz\",\"actions\":[]},{\"name\":\"bm\",\"actions\":[]},{\"name\":\"ow\",\"actions\":[]},{\"name\":\"wpr\",\"actions\":[]}]},{\"name\":\"qlveualupjmkh\",\"branches\":[{\"name\":\"obbc\",\"actions\":[]},{\"name\":\"wsrtjriplrbpbe\",\"actions\":[]},{\"name\":\"tghfgblcgwxzvl\",\"actions\":[]}]}],\"selectors\":[{\"type\":\"ChaosTargetSelector\",\"id\":\"hjkbegibtnmxieb\",\"filter\":{\"type\":\"ChaosTargetFilter\"}}],\"customerDataStorage\":{\"storageAccountResourceId\":\"oayqc\",\"blobContainerName\":\"rtzju\"}},\"location\":\"wyzmhtxon\",\"tags\":{\"knftguvriuh\":\"savjcbpwxqps\"},\"id\":\"rwmdyvxqtay\",\"name\":\"iwwroyqbexrmc\",\"type\":\"ibycno\"},{\"identity\":{\"principalId\":\"nmefqsgzvahapj\",\"tenantId\":\"hpvgqz\",\"type\":\"None\",\"userAssignedIdentities\":{\"hzovawjvzunlut\":{\"principalId\":\"djzlmwlx\",\"clientId\":\"ug\"},\"jzuaejxdultskzbb\":{\"principalId\":\"n\",\"clientId\":\"nxipeil\"},\"yofd\":{\"principalId\":\"zumveekgpwo\",\"clientId\":\"hkfpbs\"},\"mvb\":{\"principalId\":\"uusdttouwa\",\"clientId\":\"ekqvkeln\"}}},\"properties\":{\"provisioningState\":\"Succeeded\",\"steps\":[{\"name\":\"sflhhca\",\"branches\":[{\"name\":\"n\",\"actions\":[]},{\"name\":\"ixisxyawjoy\",\"actions\":[]},{\"name\":\"qcslyjpkiid\",\"actions\":[]}]},{\"name\":\"yexz\",\"branches\":[{\"name\":\"lixhnrztfol\",\"actions\":[]}]},{\"name\":\"bnxknalaulppg\",\"branches\":[{\"name\":\"tpnapnyiropuhpig\",\"actions\":[]},{\"name\":\"pgylg\",\"actions\":[]},{\"name\":\"git\",\"actions\":[]},{\"name\":\"medjvcslynqwwncw\",\"actions\":[]}]},{\"name\":\"zhxgktrmgucn\",\"branches\":[{\"name\":\"kteo\",\"actions\":[]},{\"name\":\"llwptfdy\",\"actions\":[]}]}],\"selectors\":[{\"type\":\"ChaosTargetSelector\",\"id\":\"fqbuaceopzf\",\"filter\":{\"type\":\"ChaosTargetFilter\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"hhuao\",\"filter\":{\"type\":\"ChaosTargetFilter\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"pcqeqx\",\"filter\":{\"type\":\"ChaosTargetFilter\"}}],\"customerDataStorage\":{\"storageAccountResourceId\":\"ahzxctobgbk\",\"blobContainerName\":\"oizpostmgrcfbun\"}},\"location\":\"fqjhhkxbpvjymj\",\"tags\":{\"n\":\"j\",\"ivkrtsw\":\"u\",\"vjfdx\":\"xqzvszjfa\"},\"id\":\"ivetvtcq\",\"name\":\"qtdo\",\"type\":\"mcbxvwvxysl\"}],\"nextLink\":\"hsfxoblytkb\"}") + "{\"value\":[{\"identity\":{\"principalId\":\"bgyepsbj\",\"tenantId\":\"zq\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"xtccmg\":{\"principalId\":\"pmueefjzwfqk\",\"clientId\":\"jidsuyonobglaoc\"},\"zhlrqjb\":{\"principalId\":\"dxyt\",\"clientId\":\"oyrxvwfudwpzntxh\"},\"b\":{\"principalId\":\"kfrlhrxsbky\",\"clientId\":\"ycanuzbpzkafku\"},\"maofmxagkv\":{\"principalId\":\"nwbmeh\",\"clientId\":\"eyvjusrtslhspkde\"}}},\"properties\":{\"provisioningState\":\"Succeeded\",\"steps\":[{\"name\":\"mqkrhahvljuahaqu\",\"branches\":[{\"name\":\"dhmdua\",\"actions\":[]}]},{\"name\":\"aex\",\"branches\":[{\"name\":\"vfadmws\",\"actions\":[]},{\"name\":\"crgvxpvgom\",\"actions\":[]},{\"name\":\"lf\",\"actions\":[]}]},{\"name\":\"isgwbnbbeldawkz\",\"branches\":[{\"name\":\"liourqhak\",\"actions\":[]}]}],\"selectors\":[{\"type\":\"ChaosTargetSelector\",\"id\":\"hashsfwxosow\",\"filter\":{\"type\":\"ChaosTargetFilter\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"cugicjoox\",\"filter\":{\"type\":\"ChaosTargetFilter\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"ebwpucwwfvo\",\"filter\":{\"type\":\"ChaosTargetFilter\"}}]},\"location\":\"meue\",\"tags\":{\"euojgjrwju\":\"yhz\",\"nrjawgqwg\":\"iotwmcdytdxwit\",\"klwndnhjdauwhv\":\"hniskxfbkpyc\",\"zbtd\":\"l\"},\"id\":\"xujznbmpowu\",\"name\":\"przqlveu\",\"type\":\"lupj\"},{\"identity\":{\"principalId\":\"fxobbcsws\",\"tenantId\":\"jriplrbpbewtghf\",\"type\":\"None\",\"userAssignedIdentities\":{\"cgwrtzjuz\":{\"principalId\":\"wxzvlvqhjkb\",\"clientId\":\"ibtnmxiebwwaloay\"}}},\"properties\":{\"provisioningState\":\"Succeeded\",\"steps\":[{\"name\":\"mhtxongmtsavjcb\",\"branches\":[{\"name\":\"xqpsrknftguv\",\"actions\":[]},{\"name\":\"iuhprwmdyvxqta\",\"actions\":[]},{\"name\":\"riwwroy\",\"actions\":[]},{\"name\":\"bexrmcq\",\"actions\":[]}]}],\"selectors\":[{\"type\":\"ChaosTargetSelector\",\"id\":\"ycnojvknmefqsg\",\"filter\":{\"type\":\"ChaosTargetFilter\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"ah\",\"filter\":{\"type\":\"ChaosTargetFilter\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"jyzhpvgq\",\"filter\":{\"type\":\"ChaosTargetFilter\"}}]},\"location\":\"rvxdjzlmw\",\"tags\":{\"fhzovawjvzunluth\":\"vu\",\"rnxipei\":\"n\",\"e\":\"pjzu\",\"kzbbtd\":\"xdult\"},\"id\":\"umveekgpwozuhkf\",\"name\":\"bsjyofdx\",\"type\":\"uusdttouwa\"}],\"nextLink\":\"ekqvkeln\"}") .toObject(ExperimentListResult.class); - Assertions.assertEquals("ceoveilovno", model.value().get(0).location()); - Assertions.assertEquals("jfcn", model.value().get(0).tags().get("bkc")); + Assertions.assertEquals("meue", model.value().get(0).location()); + Assertions.assertEquals("yhz", model.value().get(0).tags().get("euojgjrwju")); Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("bovpl", model.value().get(0).steps().get(0).name()); - Assertions.assertEquals("bhvgy", model.value().get(0).steps().get(0).branches().get(0).name()); - Assertions.assertEquals("skrdqmhjj", model.value().get(0).selectors().get(0).id()); - Assertions.assertEquals("cwsvlxotog", model.value().get(0).customerDataStorage().storageAccountResourceId()); - Assertions.assertEquals("rupqsxvnmicy", model.value().get(0).customerDataStorage().blobContainerName()); - Assertions.assertEquals("hsfxoblytkb", model.nextLink()); + Assertions.assertEquals("mqkrhahvljuahaqu", model.value().get(0).steps().get(0).name()); + Assertions.assertEquals("dhmdua", model.value().get(0).steps().get(0).branches().get(0).name()); + Assertions.assertEquals("hashsfwxosow", model.value().get(0).selectors().get(0).id()); + Assertions.assertEquals("ekqvkeln", model.nextLink()); } } 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 8b506cc94c0e..4503f731316f 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 @@ -11,7 +11,6 @@ import com.azure.resourcemanager.chaos.models.ChaosExperimentStep; import com.azure.resourcemanager.chaos.models.ChaosTargetFilter; import com.azure.resourcemanager.chaos.models.ChaosTargetSelector; -import com.azure.resourcemanager.chaos.models.CustomerDataStorageProperties; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -19,34 +18,76 @@ public final class ExperimentPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExperimentProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Updating\",\"steps\":[{\"name\":\"ngkpocipazy\",\"branches\":[{\"name\":\"egukgjnpiucg\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"evqzntypmrbp\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"zcdrqjsdpydnfyhx\"}]}]}],\"selectors\":[{\"type\":\"ChaosTargetSelector\",\"id\":\"oejzi\",\"filter\":{\"type\":\"ChaosTargetFilter\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"ifsjttgzfbishcb\",\"filter\":{\"type\":\"ChaosTargetFilter\"}}],\"customerDataStorage\":{\"storageAccountResourceId\":\"deyeamdphagalpbu\",\"blobContainerName\":\"gipwhonowkg\"}}") + "{\"provisioningState\":\"Canceled\",\"steps\":[{\"name\":\"buhfmvfaxkffeiit\",\"branches\":[{\"name\":\"vmezy\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"hxmzsbbzoggig\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"xwburvjxxjns\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"ydptkoen\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"ou\"}]},{\"name\":\"nvudwtiukb\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"ngkpocipazy\"}]},{\"name\":\"o\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"ukgjnpiucgygevq\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"ntypmrbpizcdrqj\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"dpydn\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"yhxdeoejzicwi\"}]},{\"name\":\"sjttgzfbish\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"khaj\"}]}]},{\"name\":\"eyeam\",\"branches\":[{\"name\":\"hagalpbuxwgipwh\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"ow\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"gshwankixz\"}]}]},{\"name\":\"injep\",\"branches\":[{\"name\":\"tmryw\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"zoqftiyqzrnkcqvy\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"lwh\"}]},{\"name\":\"lsicohoqqnwv\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"yav\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"hheunmmqhgyx\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"konocu\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"oklyaxuconuq\"}]},{\"name\":\"zf\",\"actions\":[{\"type\":\"ChaosExperimentAction\",\"name\":\"eyp\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"wrmjmwvvjektc\"},{\"type\":\"ChaosExperimentAction\",\"name\":\"senhwlrs\"}]}]},{\"name\":\"frzpwvlqdqgb\",\"branches\":[{\"name\":\"ylihkaetckt\",\"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\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"odebfqkkrbmpu\",\"filter\":{\"type\":\"ChaosTargetFilter\"}}]}") .toObject(ExperimentProperties.class); - Assertions.assertEquals("ngkpocipazy", model.steps().get(0).name()); - Assertions.assertEquals("egukgjnpiucg", model.steps().get(0).branches().get(0).name()); - Assertions.assertEquals("evqzntypmrbp", model.steps().get(0).branches().get(0).actions().get(0).name()); - Assertions.assertEquals("oejzi", model.selectors().get(0).id()); - Assertions.assertEquals("deyeamdphagalpbu", model.customerDataStorage().storageAccountResourceId()); - Assertions.assertEquals("gipwhonowkg", model.customerDataStorage().blobContainerName()); + Assertions.assertEquals("buhfmvfaxkffeiit", model.steps().get(0).name()); + Assertions.assertEquals("vmezy", model.steps().get(0).branches().get(0).name()); + Assertions.assertEquals("hxmzsbbzoggig", model.steps().get(0).branches().get(0).actions().get(0).name()); + Assertions.assertEquals("xnehmpvec", model.selectors().get(0).id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ExperimentProperties model = new ExperimentProperties() - .withSteps(Arrays.asList(new ChaosExperimentStep().withName("ngkpocipazy") - .withBranches(Arrays.asList(new ChaosExperimentBranch().withName("egukgjnpiucg") - .withActions(Arrays.asList(new ChaosExperimentAction().withName("evqzntypmrbp"), - new ChaosExperimentAction().withName("zcdrqjsdpydnfyhx"))))))) - .withSelectors(Arrays.asList(new ChaosTargetSelector().withId("oejzi").withFilter(new ChaosTargetFilter()), - new ChaosTargetSelector().withId("ifsjttgzfbishcb").withFilter(new ChaosTargetFilter()))) - .withCustomerDataStorage( - new CustomerDataStorageProperties().withStorageAccountResourceId("deyeamdphagalpbu") - .withBlobContainerName("gipwhonowkg")); + .withSteps(Arrays.asList( + new ChaosExperimentStep().withName("buhfmvfaxkffeiit") + .withBranches(Arrays.asList( + new ChaosExperimentBranch().withName("vmezy") + .withActions(Arrays.asList(new ChaosExperimentAction().withName("hxmzsbbzoggig"), + new ChaosExperimentAction().withName("xwburvjxxjns"), + new ChaosExperimentAction().withName("ydptkoen"), + new ChaosExperimentAction().withName("ou"))), + new ChaosExperimentBranch().withName("nvudwtiukb") + .withActions(Arrays.asList(new ChaosExperimentAction().withName("ngkpocipazy"))), + new ChaosExperimentBranch().withName("o") + .withActions(Arrays.asList(new ChaosExperimentAction().withName("ukgjnpiucgygevq"), + new ChaosExperimentAction().withName("ntypmrbpizcdrqj"), + new ChaosExperimentAction().withName("dpydn"), + new ChaosExperimentAction().withName("yhxdeoejzicwi"))), + new ChaosExperimentBranch().withName("sjttgzfbish") + .withActions(Arrays.asList(new ChaosExperimentAction().withName("khaj"))))), + new ChaosExperimentStep().withName("eyeam") + .withBranches(Arrays.asList(new ChaosExperimentBranch().withName("hagalpbuxwgipwh") + .withActions(Arrays.asList(new ChaosExperimentAction().withName("ow"), + new ChaosExperimentAction().withName("gshwankixz"))))), + new ChaosExperimentStep().withName("injep") + .withBranches(Arrays.asList( + new ChaosExperimentBranch().withName("tmryw") + .withActions(Arrays.asList(new ChaosExperimentAction().withName("zoqftiyqzrnkcqvy"), + new ChaosExperimentAction().withName("lwh"))), + new ChaosExperimentBranch().withName("lsicohoqqnwv") + .withActions(Arrays.asList(new ChaosExperimentAction().withName("yav"), + new ChaosExperimentAction().withName("hheunmmqhgyx"), + new ChaosExperimentAction().withName("konocu"), + new ChaosExperimentAction().withName("oklyaxuconuq"))), + new ChaosExperimentBranch() + .withName("zf") + .withActions( + Arrays.asList(new ChaosExperimentAction().withName("eyp"), + new ChaosExperimentAction().withName("wrmjmwvvjektc"), + new ChaosExperimentAction().withName("senhwlrs"))))), + new ChaosExperimentStep().withName("frzpwvlqdqgb") + .withBranches(Arrays.asList( + new ChaosExperimentBranch().withName("ylihkaetckt") + .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()), + new ChaosTargetSelector().withId("odebfqkkrbmpu").withFilter(new ChaosTargetFilter()))); model = BinaryData.fromObject(model).toObject(ExperimentProperties.class); - Assertions.assertEquals("ngkpocipazy", model.steps().get(0).name()); - Assertions.assertEquals("egukgjnpiucg", model.steps().get(0).branches().get(0).name()); - Assertions.assertEquals("evqzntypmrbp", model.steps().get(0).branches().get(0).actions().get(0).name()); - Assertions.assertEquals("oejzi", model.selectors().get(0).id()); - Assertions.assertEquals("deyeamdphagalpbu", model.customerDataStorage().storageAccountResourceId()); - Assertions.assertEquals("gipwhonowkg", model.customerDataStorage().blobContainerName()); + Assertions.assertEquals("buhfmvfaxkffeiit", model.steps().get(0).name()); + Assertions.assertEquals("vmezy", model.steps().get(0).branches().get(0).name()); + Assertions.assertEquals("hxmzsbbzoggig", model.steps().get(0).branches().get(0).actions().get(0).name()); + Assertions.assertEquals("xnehmpvec", model.selectors().get(0).id()); } } 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 d901508f4b74..3be855df8132 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 @@ -17,21 +17,22 @@ public final class ExperimentUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExperimentUpdate model = BinaryData.fromString( - "{\"tags\":{\"nbtkcxywnytnr\":\"pbh\"},\"identity\":{\"principalId\":\"lqidyby\",\"tenantId\":\"zfcl\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"ocmnyyazttbtwwrq\":{\"principalId\":\"babphlwrqlfk\",\"clientId\":\"thsu\"},\"hqwa\":{\"principalId\":\"edckzywbiexzfey\",\"clientId\":\"axibxujw\"},\"d\":{\"principalId\":\"uzyoxaep\",\"clientId\":\"zjancuxr\"}}}}") + "{\"tags\":{\"zb\":\"pvlopwiyighxpkd\",\"upedeojnabckhs\":\"iuebbaumny\"},\"identity\":{\"principalId\":\"psiebtfhvpes\",\"tenantId\":\"skrdqmhjj\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"cwsvlxotog\":{\"principalId\":\"wky\",\"clientId\":\"uutkncw\"},\"yfjfcnjbkcn\":{\"principalId\":\"rupqsxvnmicy\",\"clientId\":\"ceoveilovno\"},\"phoxus\":{\"principalId\":\"hbttkphyw\",\"clientId\":\"vjtoqnermclfp\"}}}}") .toObject(ExperimentUpdate.class); - Assertions.assertEquals("pbh", model.tags().get("nbtkcxywnytnr")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); + Assertions.assertEquals("pvlopwiyighxpkd", model.tags().get("zb")); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ExperimentUpdate model = new ExperimentUpdate().withTags(mapOf("nbtkcxywnytnr", "pbh")) - .withIdentity(new ResourceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("ocmnyyazttbtwwrq", new UserAssignedIdentity(), "hqwa", - new UserAssignedIdentity(), "d", new UserAssignedIdentity()))); + ExperimentUpdate model + = new ExperimentUpdate().withTags(mapOf("zb", "pvlopwiyighxpkd", "upedeojnabckhs", "iuebbaumny")) + .withIdentity(new ResourceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) + .withUserAssignedIdentities(mapOf("cwsvlxotog", new UserAssignedIdentity(), "yfjfcnjbkcn", + new UserAssignedIdentity(), "phoxus", new UserAssignedIdentity()))); model = BinaryData.fromObject(model).toObject(ExperimentUpdate.class); - Assertions.assertEquals("pbh", model.tags().get("nbtkcxywnytnr")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); + Assertions.assertEquals("pvlopwiyighxpkd", model.tags().get("zb")); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); } // 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 96434d229ff2..4db829169703 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 @@ -14,7 +14,6 @@ import com.azure.resourcemanager.chaos.models.ChaosExperimentStep; import com.azure.resourcemanager.chaos.models.ChaosTargetFilter; import com.azure.resourcemanager.chaos.models.ChaosTargetSelector; -import com.azure.resourcemanager.chaos.models.CustomerDataStorageProperties; import com.azure.resourcemanager.chaos.models.Experiment; import com.azure.resourcemanager.chaos.models.ManagedServiceIdentityType; import com.azure.resourcemanager.chaos.models.ResourceIdentity; @@ -32,7 +31,7 @@ public final class ExperimentsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"identity\":{\"principalId\":\"sgb\",\"tenantId\":\"antuygdhgaqipirp\",\"type\":\"None\",\"userAssignedIdentities\":{\"uuerctatoyi\":{\"principalId\":\"fulopmjnlexwhcb\",\"clientId\":\"ibkeph\"}}},\"properties\":{\"provisioningState\":\"Succeeded\",\"steps\":[{\"name\":\"brlc\",\"branches\":[{\"name\":\"duczkgof\",\"actions\":[]},{\"name\":\"y\",\"actions\":[]},{\"name\":\"srucvcrrpcjtt\",\"actions\":[]},{\"name\":\"st\",\"actions\":[]}]},{\"name\":\"jeaq\",\"branches\":[{\"name\":\"mvvfko\",\"actions\":[]},{\"name\":\"mlghktuidvrmazlp\",\"actions\":[]},{\"name\":\"wwexymzvlazipbh\",\"actions\":[]},{\"name\":\"wvqsgny\",\"actions\":[]}]},{\"name\":\"uuzivensrpmeyyvp\",\"branches\":[{\"name\":\"atlb\",\"actions\":[]},{\"name\":\"jp\",\"actions\":[]}]},{\"name\":\"gsksrfhf\",\"branches\":[{\"name\":\"lmknbnxwcdom\",\"actions\":[]}]}],\"selectors\":[{\"type\":\"ChaosTargetSelector\",\"id\":\"vfqawzfgbrttuiac\",\"filter\":{\"type\":\"ChaosTargetFilter\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"iexhajl\",\"filter\":{\"type\":\"ChaosTargetFilter\"}}],\"customerDataStorage\":{\"storageAccountResourceId\":\"iqfyuttdi\",\"blobContainerName\":\"b\"}},\"location\":\"n\",\"tags\":{\"yctww\":\"mtx\",\"cvogygzyvne\":\"zwxjlm\",\"zbkr\":\"zaifghtmoqqtlff\"},\"id\":\"jjjavfqnvhnq\",\"name\":\"ewdogiyetesy\",\"type\":\"vidbztjhqtfb\"}"; + = "{\"identity\":{\"principalId\":\"amtmcz\",\"tenantId\":\"m\",\"type\":\"None\",\"userAssignedIdentities\":{\"ojmsvpkjprvkwc\":{\"principalId\":\"wqiok\",\"clientId\":\"sx\"},\"tczheydbsdshmkx\":{\"principalId\":\"ql\",\"clientId\":\"x\"}}},\"properties\":{\"provisioningState\":\"Succeeded\",\"steps\":[{\"name\":\"vbbxuripl\",\"branches\":[{\"name\":\"n\",\"actions\":[]},{\"name\":\"tbaxk\",\"actions\":[]},{\"name\":\"xywr\",\"actions\":[]}]},{\"name\":\"kpyklyhp\",\"branches\":[{\"name\":\"odpvruudlgzib\",\"actions\":[]},{\"name\":\"hostgktstvdxecl\",\"actions\":[]}]},{\"name\":\"edqbc\",\"branches\":[{\"name\":\"zlhp\",\"actions\":[]},{\"name\":\"odqkdlwwqfb\",\"actions\":[]},{\"name\":\"mlkxtrqjfs\",\"actions\":[]},{\"name\":\"lmbtxhwgfwsrt\",\"actions\":[]}]},{\"name\":\"wcoezbrhub\",\"branches\":[{\"name\":\"hud\",\"actions\":[]}]}],\"selectors\":[{\"type\":\"ChaosTargetSelector\",\"id\":\"oookkqfq\",\"filter\":{\"type\":\"ChaosTargetFilter\"}}]},\"location\":\"leorfmluiqtqz\",\"tags\":{\"kq\":\"yvnqqybaryeuay\",\"tiewdj\":\"bqgzslesjcbhern\"},\"id\":\"vbquwr\",\"name\":\"ehwagoh\",\"type\":\"uffkmrqemvvh\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -43,52 +42,28 @@ public void testCreateOrUpdate() throws Exception { Experiment response = manager.experiments() - .define("oawjqoyueay") - .withRegion("wggahttzlswvaj") - .withExistingResourceGroup("zezkhhltnjadh") - .withSteps( - Arrays.asList( - new ChaosExperimentStep().withName("vqvwzkjopwbe") - .withBranches( - Arrays.asList(new ChaosExperimentBranch().withName("r").withActions(Arrays.asList()), - new ChaosExperimentBranch().withName("kwzdqybxcea").withActions(Arrays.asList()), - new ChaosExperimentBranch().withName("xcptsoqfyiaseqc") - .withActions(Arrays.asList()))), - new ChaosExperimentStep().withName("krtt") - .withBranches(Arrays.asList( - new ChaosExperimentBranch().withName("azisgyk").withActions(Arrays.asList()), - new ChaosExperimentBranch().withName("uem").withActions(Arrays.asList()))), - new ChaosExperimentStep().withName("anbwzohmnrxxbso") - .withBranches(Arrays.asList( - new ChaosExperimentBranch().withName("linhmdptysprqs").withActions(Arrays.asList()), - new ChaosExperimentBranch().withName("nzxojpslsvjgpli").withActions(Arrays.asList()), - new ChaosExperimentBranch().withName("fiqwoy").withActions(Arrays.asList()), - new ChaosExperimentBranch().withName("qvapcohhoucq").withActions(Arrays.asList()))), - new ChaosExperimentStep().withName("q") - .withBranches(Arrays.asList( - new ChaosExperimentBranch().withName("xcxzrzdcgdzben").withActions(Arrays.asList()))))) - .withSelectors( - Arrays.asList(new ChaosTargetSelector().withId("bcawetz").withFilter(new ChaosTargetFilter()), - new ChaosTargetSelector().withId("dtjwfljhznamt").withFilter(new ChaosTargetFilter()), - new ChaosTargetSelector().withId("tmzwcjjn").withFilter(new ChaosTargetFilter()), - new ChaosTargetSelector().withId("tjzmi").withFilter(new ChaosTargetFilter()))) - .withTags( - mapOf("x", "t", "unwqr", "oqza", "uocnjrohmbpyr", "zfrgqhaohcm", "ocxnehvsmtodl", "xameblydyvkfkm")) - .withIdentity(new ResourceIdentity().withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf("dhxiidlopedbwd", new UserAssignedIdentity(), "jelaqacigele", - new UserAssignedIdentity()))) - .withCustomerDataStorage(new CustomerDataStorageProperties().withStorageAccountResourceId("gat") - .withBlobContainerName("uvbxngr")) + .define("wdgzxulucv") + .withRegion("pxehuwrykqga") + .withExistingResourceGroup("kasdvlm") + .withSteps(Arrays.asList(new ChaosExperimentStep().withName("zjxvydfcea") + .withBranches(Arrays + .asList(new ChaosExperimentBranch().withName("lhvygdyftu").withActions(Arrays.asList()))))) + .withSelectors(Arrays.asList( + new ChaosTargetSelector().withId("twnawjslbiwkojgc").withFilter(new ChaosTargetFilter()), + new ChaosTargetSelector().withId("tsf").withFilter(new ChaosTargetFilter()), + new ChaosTargetSelector().withId("nbaeqphchqn").withFilter(new ChaosTargetFilter()))) + .withTags(mapOf("dvk", "viklb", "srhnjivo", "bejdznxcv")) + .withIdentity(new ResourceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) + .withUserAssignedIdentities( + mapOf("qhih", new UserAssignedIdentity(), "xjvfoimwksl", new UserAssignedIdentity()))) .create(); - Assertions.assertEquals("n", response.location()); - Assertions.assertEquals("mtx", response.tags().get("yctww")); + Assertions.assertEquals("leorfmluiqtqz", response.location()); + Assertions.assertEquals("yvnqqybaryeuay", response.tags().get("kq")); Assertions.assertEquals(ManagedServiceIdentityType.NONE, response.identity().type()); - Assertions.assertEquals("brlc", response.steps().get(0).name()); - Assertions.assertEquals("duczkgof", response.steps().get(0).branches().get(0).name()); - Assertions.assertEquals("vfqawzfgbrttuiac", response.selectors().get(0).id()); - Assertions.assertEquals("iqfyuttdi", response.customerDataStorage().storageAccountResourceId()); - Assertions.assertEquals("b", response.customerDataStorage().blobContainerName()); + Assertions.assertEquals("vbbxuripl", response.steps().get(0).name()); + Assertions.assertEquals("n", response.steps().get(0).branches().get(0).name()); + Assertions.assertEquals("oookkqfq", 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 80f8b7fd8c42..8cd003d0344b 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 @@ -20,7 +20,7 @@ public final class ExperimentsExecutionDetailsWithResponseMockTests { @Test public void testExecutionDetailsWithResponse() throws Exception { String responseStr - = "{\"type\":\"p\",\"id\":\"kdqzrdzsylo\",\"name\":\"gtrczzydmxzjijpv\",\"properties\":{\"status\":\"rkihcirld\",\"startedAt\":\"2021-09-20T22:33:09Z\",\"stoppedAt\":\"2021-05-06T09:32:51Z\",\"provisioningState\":\"Canceled\",\"failureReason\":\"nbkkjanurnnq\",\"lastActionAt\":\"2021-11-30T17:42:01Z\",\"runInformation\":{\"steps\":[{\"stepName\":\"xqltgrd\",\"stepId\":\"ypxrx\",\"status\":\"fihwu\",\"branches\":[{},{},{}]},{\"stepName\":\"a\",\"stepId\":\"rbxrblmliowxihsp\",\"status\":\"wqagnepzwa\",\"branches\":[{}]},{\"stepName\":\"sbq\",\"stepId\":\"agwwrxaom\",\"status\":\"sgl\",\"branches\":[{},{},{}]}]}}}"; + = "{\"type\":\"zh\",\"id\":\"bibgjmfxumv\",\"name\":\"luyovwxnbkfezzx\",\"properties\":{\"status\":\"hwzdgirujbz\",\"startedAt\":\"2021-07-16T17:20:22Z\",\"stoppedAt\":\"2021-11-19T14:07:09Z\",\"failureReason\":\"btdcqvpniyujvi\",\"lastActionAt\":\"2021-03-20T12:04:05Z\",\"runInformation\":{\"steps\":[{\"stepName\":\"ssnrbgye\",\"stepId\":\"ymsgaojfmwnc\",\"status\":\"mrfhirctymox\",\"branches\":[{},{},{}]},{\"stepName\":\"ipiwy\",\"stepId\":\"uh\",\"status\":\"cpqjlihhyu\",\"branches\":[{},{},{},{}]}]}}}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testExecutionDetailsWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ExperimentExecutionDetails response = manager.experiments() - .executionDetailsWithResponse("vxnqmhrpqpd", "wmkoisq", "ssffxuifmc", com.azure.core.util.Context.NONE) + .executionDetailsWithResponse("gufhyaomtbg", "havgrvk", "fo", 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 8af171e60cd2..07286917fdca 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 @@ -22,7 +22,7 @@ public final class ExperimentsGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"identity\":{\"principalId\":\"rtws\",\"tenantId\":\"vv\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"hoocl\":{\"principalId\":\"vtrrmhwrbfdpyflu\",\"clientId\":\"vjglrocuyzlwhhme\"},\"ujxsglhsr\":{\"principalId\":\"n\",\"clientId\":\"memczjkmmyk\"},\"qyhqo\":{\"principalId\":\"yejylmbkzudnigrf\",\"clientId\":\"otjewlpxuzzjgnre\"}}},\"properties\":{\"provisioningState\":\"Creating\",\"steps\":[{\"name\":\"iqakydiwfbr\",\"branches\":[{\"name\":\"pzdqtvhcspod\",\"actions\":[]},{\"name\":\"qaxsipietgbebjf\",\"actions\":[]},{\"name\":\"lbmoichd\",\"actions\":[]}]},{\"name\":\"pnfpubntnbat\",\"branches\":[{\"name\":\"iqsowsaaelc\",\"actions\":[]},{\"name\":\"ttcjuhplrvkmjc\",\"actions\":[]},{\"name\":\"mjvlgfgg\",\"actions\":[]},{\"name\":\"vkyylizrzbjpsf\",\"actions\":[]}]},{\"name\":\"sfuztlvtmv\",\"branches\":[{\"name\":\"bwidql\",\"actions\":[]},{\"name\":\"hukoveofizrv\",\"actions\":[]},{\"name\":\"f\",\"actions\":[]}]},{\"name\":\"mjm\",\"branches\":[{\"name\":\"wyzgiblkuj\",\"actions\":[]},{\"name\":\"llfojuidjp\",\"actions\":[]}]}],\"selectors\":[{\"type\":\"ChaosTargetSelector\",\"id\":\"yjucejikzoeo\",\"filter\":{\"type\":\"ChaosTargetFilter\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"tzejetjklnt\",\"filter\":{\"type\":\"ChaosTargetFilter\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"yjuzkdb\",\"filter\":{\"type\":\"ChaosTargetFilter\"}}],\"customerDataStorage\":{\"storageAccountResourceId\":\"xrzvhqjwtrhtgvgz\",\"blobContainerName\":\"rrkolawjmjs\"}},\"location\":\"rokcdxfzzzwyjaf\",\"tags\":{\"mozusgzvlnsnnjz\":\"hguynuchlgmltxdw\",\"mwamxqzragpgdph\":\"pafolp\"},\"id\":\"vdulajv\",\"name\":\"ejchcsrlz\",\"type\":\"nmzlanru\"}"; + = "{\"identity\":{\"principalId\":\"eokerqwkyhkobopg\",\"tenantId\":\"dkow\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"ftnkhtj\":{\"principalId\":\"cr\",\"clientId\":\"bwccsnjvcdwxlpqe\"},\"tmdvypgikdgs\":{\"principalId\":\"i\",\"clientId\":\"wfqatmtd\"}}},\"properties\":{\"provisioningState\":\"Canceled\",\"steps\":[{\"name\":\"birryuzhl\",\"branches\":[{\"name\":\"joqrvqqaatj\",\"actions\":[]}]}],\"selectors\":[{\"type\":\"ChaosTargetSelector\",\"id\":\"rv\",\"filter\":{\"type\":\"ChaosTargetFilter\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"upmfiibfg\",\"filter\":{\"type\":\"ChaosTargetFilter\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"ioolvrwxkvtkkgll\",\"filter\":{\"type\":\"ChaosTargetFilter\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"jygvjayvbl\",\"filter\":{\"type\":\"ChaosTargetFilter\"}}]},\"location\":\"k\",\"tags\":{\"opbyrqufegxu\":\"bxvvyhg\",\"bnhlmc\":\"wz\",\"dn\":\"l\",\"ijejvegrhbpn\":\"itvgbmhrixkwm\"},\"id\":\"ixexcc\",\"name\":\"dreaxh\",\"type\":\"exdrrvqahqkg\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,16 +32,14 @@ public void testGetByResourceGroupWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Experiment response = manager.experiments() - .getByResourceGroupWithResponse("fjmzsyzfho", "lhikcyychunsj", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("qxqvpsvuoymgc", "elvezrypq", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("rokcdxfzzzwyjaf", response.location()); - Assertions.assertEquals("hguynuchlgmltxdw", response.tags().get("mozusgzvlnsnnjz")); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, response.identity().type()); - Assertions.assertEquals("iqakydiwfbr", response.steps().get(0).name()); - Assertions.assertEquals("pzdqtvhcspod", response.steps().get(0).branches().get(0).name()); - Assertions.assertEquals("yjucejikzoeo", response.selectors().get(0).id()); - Assertions.assertEquals("xrzvhqjwtrhtgvgz", response.customerDataStorage().storageAccountResourceId()); - Assertions.assertEquals("rrkolawjmjs", response.customerDataStorage().blobContainerName()); + Assertions.assertEquals("k", response.location()); + Assertions.assertEquals("bxvvyhg", response.tags().get("opbyrqufegxu")); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, response.identity().type()); + Assertions.assertEquals("birryuzhl", response.steps().get(0).name()); + Assertions.assertEquals("joqrvqqaatj", response.steps().get(0).branches().get(0).name()); + Assertions.assertEquals("rv", 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 6fe29b3b7450..a93db311a087 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 @@ -20,7 +20,7 @@ public final class ExperimentsGetExecutionWithResponseMockTests { @Test public void testGetExecutionWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"status\":\"sizmoae\",\"startedAt\":\"2021-04-21T03:07:40Z\",\"stoppedAt\":\"2021-01-30T15:33:29Z\",\"provisioningState\":\"Deleting\"},\"id\":\"edwcgyee\",\"name\":\"xeiqbpsmg\",\"type\":\"mguaml\"}"; + = "{\"properties\":{\"status\":\"kkgthr\",\"startedAt\":\"2021-10-07T20:30:06Z\",\"stoppedAt\":\"2021-03-30T21:22:17Z\"},\"id\":\"dhqxvcx\",\"name\":\"frpdsofbshrns\",\"type\":\"buswdvzyy\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetExecutionWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ExperimentExecution response = manager.experiments() - .getExecutionWithResponse("eeyaswl", "augmrmfjlr", "wtoaukhfk", com.azure.core.util.Context.NONE) + .getExecutionWithResponse("tw", "sgogczhonnxk", "lgnyhmo", 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 4a3f6f6384ec..a000b3798929 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 @@ -21,7 +21,7 @@ public final class ExperimentsListAllExecutionsMockTests { @Test public void testListAllExecutions() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"status\":\"kympqanxrjkixtw\",\"startedAt\":\"2021-11-28T23:05:19Z\",\"stoppedAt\":\"2021-11-26T22:43:20Z\",\"provisioningState\":\"Deleting\"},\"id\":\"ghshxcylhkgmnsg\",\"name\":\"pxycphdr\",\"type\":\"jjkhvyomaclu\"}]}"; + = "{\"value\":[{\"properties\":{\"status\":\"zejntps\",\"startedAt\":\"2021-03-12T23:39:14Z\",\"stoppedAt\":\"2021-09-17T14:36Z\"},\"id\":\"l\",\"name\":\"ukry\",\"type\":\"xtqmieoxor\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,8 +30,8 @@ public void testListAllExecutions() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response - = manager.experiments().listAllExecutions("dlrgms", "lzgaufcshhvnew", com.azure.core.util.Context.NONE); + PagedIterable response = manager.experiments() + .listAllExecutions("ycnunvjsrtk", "awnopqgikyzirtxd", 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 3cfdef25b0c4..350109d7dbec 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 @@ -23,7 +23,7 @@ public final class ExperimentsListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"identity\":{\"principalId\":\"mqrhvthl\",\"tenantId\":\"wdcxsmlzzhz\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"rbgjekglkl\":{\"principalId\":\"lgyd\",\"clientId\":\"qvlnnpxybafiqgea\"},\"hj\":{\"principalId\":\"ulidwc\",\"clientId\":\"mzegjon\"},\"tdigsxcdglj\":{\"principalId\":\"wgdnqzbr\",\"clientId\":\"spzhzmtksjc\"},\"mdgycxn\":{\"principalId\":\"keuachtomf\",\"clientId\":\"ytswfp\"}}},\"properties\":{\"provisioningState\":\"Creating\",\"steps\":[{\"name\":\"hqjjys\",\"branches\":[{\"name\":\"rlpshhkv\",\"actions\":[]},{\"name\":\"edwqslsrh\",\"actions\":[]}]},{\"name\":\"pq\",\"branches\":[{\"name\":\"wskondcbrwimuvqe\",\"actions\":[]},{\"name\":\"osovyrrleaesin\",\"actions\":[]}]},{\"name\":\"qtljqobbpihehc\",\"branches\":[{\"name\":\"ybmrqbrjbbmp\",\"actions\":[]}]},{\"name\":\"dlvykfrex\",\"branches\":[{\"name\":\"s\",\"actions\":[]},{\"name\":\"qwjksghudgz\",\"actions\":[]},{\"name\":\"xog\",\"actions\":[]},{\"name\":\"ggsvoujkxibdaf\",\"actions\":[]}]}],\"selectors\":[{\"type\":\"ChaosTargetSelector\",\"id\":\"kmdyomkxfbvfbh\",\"filter\":{\"type\":\"ChaosTargetFilter\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"i\",\"filter\":{\"type\":\"ChaosTargetFilter\"}}],\"customerDataStorage\":{\"storageAccountResourceId\":\"pgddeimawz\",\"blobContainerName\":\"gkkumuikjcj\"}},\"location\":\"ztbws\",\"tags\":{\"ytwvczcswkacve\":\"owxwcomli\",\"pqthehnmnaoya\":\"yfdvlvhbwrnfxtgd\"},\"id\":\"kcoeqswank\",\"name\":\"t\",\"type\":\"tmhdroznnhdr\"}]}"; + = "{\"value\":[{\"identity\":{\"principalId\":\"vrvmtgjqppyost\",\"tenantId\":\"nzm\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"jglikkxwslolb\":{\"principalId\":\"pnsxkmcwaek\",\"clientId\":\"jreafxtsgum\"},\"gplcrpwjxeznoigb\":{\"principalId\":\"vuzlm\",\"clientId\":\"elfk\"}}},\"properties\":{\"provisioningState\":\"Failed\",\"steps\":[{\"name\":\"mw\",\"branches\":[{\"name\":\"nbsazejjoqkag\",\"actions\":[]}]}],\"selectors\":[{\"type\":\"ChaosTargetSelector\",\"id\":\"sxtta\",\"filter\":{\"type\":\"ChaosTargetFilter\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"zxnfaaz\",\"filter\":{\"type\":\"ChaosTargetFilter\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"dtnkdmkq\",\"filter\":{\"type\":\"ChaosTargetFilter\"}}]},\"location\":\"wuenvr\",\"tags\":{\"ibreb\":\"ou\"},\"id\":\"aays\",\"name\":\"kixqtnqtt\",\"type\":\"zlwfffiakp\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,17 +32,14 @@ public void testListByResourceGroup() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response - = manager.experiments().listByResourceGroup("dwv", true, "hcnzqt", com.azure.core.util.Context.NONE); + PagedIterable response = manager.experiments() + .listByResourceGroup("tpwijnh", true, "svfycxzbfv", com.azure.core.util.Context.NONE); - Assertions.assertEquals("ztbws", response.iterator().next().location()); - Assertions.assertEquals("owxwcomli", response.iterator().next().tags().get("ytwvczcswkacve")); + Assertions.assertEquals("wuenvr", response.iterator().next().location()); + Assertions.assertEquals("ou", response.iterator().next().tags().get("ibreb")); Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, response.iterator().next().identity().type()); - Assertions.assertEquals("hqjjys", response.iterator().next().steps().get(0).name()); - Assertions.assertEquals("rlpshhkv", response.iterator().next().steps().get(0).branches().get(0).name()); - Assertions.assertEquals("kmdyomkxfbvfbh", response.iterator().next().selectors().get(0).id()); - Assertions.assertEquals("pgddeimawz", - response.iterator().next().customerDataStorage().storageAccountResourceId()); - Assertions.assertEquals("gkkumuikjcj", response.iterator().next().customerDataStorage().blobContainerName()); + Assertions.assertEquals("mw", response.iterator().next().steps().get(0).name()); + Assertions.assertEquals("nbsazejjoqkag", response.iterator().next().steps().get(0).branches().get(0).name()); + Assertions.assertEquals("sxtta", 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 8fb712e40372..e38800499386 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 @@ -23,7 +23,7 @@ public final class ExperimentsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"identity\":{\"principalId\":\"ae\",\"tenantId\":\"zgfbukklelssx\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"ewbidyvteowxv\":{\"principalId\":\"xzujksrlsm\",\"clientId\":\"sqplpvmjcd\"}}},\"properties\":{\"provisioningState\":\"Deleting\",\"steps\":[{\"name\":\"deugf\",\"branches\":[{\"name\":\"zec\",\"actions\":[]},{\"name\":\"axwk\",\"actions\":[]},{\"name\":\"fykhvuhxepmru\",\"actions\":[]},{\"name\":\"znabaobns\",\"actions\":[]}]},{\"name\":\"ujdjltymkmvg\",\"branches\":[{\"name\":\"hywartspph\",\"actions\":[]},{\"name\":\"ixkykxd\",\"actions\":[]},{\"name\":\"sj\",\"actions\":[]}]},{\"name\":\"emmucfxh\",\"branches\":[{\"name\":\"kflrmymy\",\"actions\":[]},{\"name\":\"nc\",\"actions\":[]},{\"name\":\"lhrisw\",\"actions\":[]},{\"name\":\"lmiiiovg\",\"actions\":[]}]}],\"selectors\":[{\"type\":\"ChaosTargetSelector\",\"id\":\"gxuugqkctotio\",\"filter\":{\"type\":\"ChaosTargetFilter\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"xteqdptjgwdtg\",\"filter\":{\"type\":\"ChaosTargetFilter\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"ranblwphqlkccu\",\"filter\":{\"type\":\"ChaosTargetFilter\"}},{\"type\":\"ChaosTargetSelector\",\"id\":\"ygqwahoiu\",\"filter\":{\"type\":\"ChaosTargetFilter\"}}],\"customerDataStorage\":{\"storageAccountResourceId\":\"iip\",\"blobContainerName\":\"lvawuwzdufypivls\"}},\"location\":\"jpmcub\",\"tags\":{\"ubvphavpmhbrbqgv\":\"foxx\",\"zqedikdfrdbi\":\"ovpbbttefjoknssq\",\"zcxmjpbyep\":\"mrjgeihfqlggwfi\",\"rc\":\"mgtvlj\"},\"id\":\"yfqi\",\"name\":\"gxhnpomyqwcabv\",\"type\":\"ui\"}]}"; + = "{\"value\":[{\"identity\":{\"principalId\":\"ozphvwauyqncygu\",\"tenantId\":\"vipmdscwxqupevzh\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"n\":{\"principalId\":\"xhojuj\",\"clientId\":\"pelmcuvhixbjxyf\"},\"sttp\":{\"principalId\":\"r\",\"clientId\":\"o\"},\"ncu\":{\"principalId\":\"w\",\"clientId\":\"bnujrywvtylbf\"}}},\"properties\":{\"provisioningState\":\"Deleting\",\"steps\":[{\"name\":\"wiithtywub\",\"branches\":[{\"name\":\"bihwqknfdnt\",\"actions\":[]},{\"name\":\"jchrdgoihxumw\",\"actions\":[]}]}],\"selectors\":[{\"type\":\"ChaosTargetSelector\",\"id\":\"ond\",\"filter\":{\"type\":\"ChaosTargetFilter\"}}]},\"location\":\"uu\",\"tags\":{\"ytsbwtovv\":\"lwg\",\"iufxqknpir\":\"gseinq\",\"fcdmqnrojlpijn\":\"nepttwqmsni\",\"atiz\":\"rxfrddhc\"},\"id\":\"ronasxift\",\"name\":\"zq\",\"type\":\"zh\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,17 +33,14 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.experiments().list(false, "tgjcsgguxheml", com.azure.core.util.Context.NONE); + = manager.experiments().list(false, "qqmtedltmmji", com.azure.core.util.Context.NONE); - Assertions.assertEquals("jpmcub", response.iterator().next().location()); - Assertions.assertEquals("foxx", response.iterator().next().tags().get("ubvphavpmhbrbqgv")); + Assertions.assertEquals("uu", response.iterator().next().location()); + Assertions.assertEquals("lwg", response.iterator().next().tags().get("ytsbwtovv")); Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, response.iterator().next().identity().type()); - Assertions.assertEquals("deugf", response.iterator().next().steps().get(0).name()); - Assertions.assertEquals("zec", response.iterator().next().steps().get(0).branches().get(0).name()); - Assertions.assertEquals("gxuugqkctotio", response.iterator().next().selectors().get(0).id()); - Assertions.assertEquals("iip", response.iterator().next().customerDataStorage().storageAccountResourceId()); - Assertions.assertEquals("lvawuwzdufypivls", - response.iterator().next().customerDataStorage().blobContainerName()); + Assertions.assertEquals("wiithtywub", response.iterator().next().steps().get(0).name()); + Assertions.assertEquals("bihwqknfdnt", response.iterator().next().steps().get(0).branches().get(0).name()); + Assertions.assertEquals("ond", response.iterator().next().selectors().get(0).id()); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExternalResourceTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExternalResourceTests.java deleted file mode 100644 index b03aa91bafd8..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ExternalResourceTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.chaos.models.ExternalResource; -import org.junit.jupiter.api.Assertions; - -public final class ExternalResourceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExternalResource model - = BinaryData.fromString("{\"resourceId\":\"wfansnvpdi\"}").toObject(ExternalResource.class); - Assertions.assertEquals("wfansnvpdi", model.resourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExternalResource model = new ExternalResource().withResourceId("wfansnvpdi"); - model = BinaryData.fromObject(model).toObject(ExternalResource.class); - Assertions.assertEquals("wfansnvpdi", model.resourceId()); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/FixResourcePermissionsRequestTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/FixResourcePermissionsRequestTests.java deleted file mode 100644 index e65d0919e15f..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/FixResourcePermissionsRequestTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.chaos.models.FixResourcePermissionsRequest; -import org.junit.jupiter.api.Assertions; - -public final class FixResourcePermissionsRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FixResourcePermissionsRequest model - = BinaryData.fromString("{\"whatIf\":true}").toObject(FixResourcePermissionsRequest.class); - Assertions.assertTrue(model.whatIf()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FixResourcePermissionsRequest model = new FixResourcePermissionsRequest().withWhatIf(true); - model = BinaryData.fromObject(model).toObject(FixResourcePermissionsRequest.class); - Assertions.assertTrue(model.whatIf()); - } -} 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 1298664d1eb2..42c12c473d5d 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 @@ -11,7 +11,7 @@ public final class OperationDisplayTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OperationDisplay model = BinaryData.fromString( - "{\"provider\":\"xaolth\",\"resource\":\"rgqjbpfzfsinzg\",\"operation\":\"cjrwzoxxjtfellu\",\"description\":\"zitonpeqfpjkjl\"}") + "{\"provider\":\"gvfcj\",\"resource\":\"zoxxjtf\",\"operation\":\"luwfzitonpeqfpjk\",\"description\":\"xofpdvhpfxxypi\"}") .toObject(OperationDisplay.class); } } 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 2878165f522f..c049dd714bf9 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,7 +11,7 @@ public final class OperationInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OperationInner model = BinaryData.fromString( - "{\"name\":\"slwejdpvw\",\"isDataAction\":false,\"display\":{\"provider\":\"soacctazakl\",\"resource\":\"ahbc\",\"operation\":\"ffdfdosygexpa\",\"description\":\"akhmsbzjhcrz\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}") + "{\"name\":\"ffdfdosygexpa\",\"isDataAction\":true,\"display\":{\"provider\":\"msbzjhcrz\",\"resource\":\"dphlxaolt\",\"operation\":\"trg\",\"description\":\"bpf\"},\"origin\":\"user\",\"actionType\":\"Internal\"}") .toObject(OperationInner.class); } } 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 874c480c3b05..cd5d561edc79 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 @@ -12,8 +12,8 @@ public final class OperationListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OperationListResult model = BinaryData.fromString( - "{\"value\":[{\"name\":\"hfcbjysa\",\"isDataAction\":false,\"display\":{\"provider\":\"qhabifpikxwcz\",\"resource\":\"scnpqxuhivy\",\"operation\":\"iwbybrkxvdumjg\",\"description\":\"fwvuk\"},\"origin\":\"user\",\"actionType\":\"Internal\"},{\"name\":\"cs\",\"isDataAction\":false,\"display\":{\"provider\":\"nyejhkryhtnap\",\"resource\":\"wlokjyem\",\"operation\":\"vnipjox\",\"description\":\"nchgej\"},\"origin\":\"system\",\"actionType\":\"Internal\"},{\"name\":\"ilzyd\",\"isDataAction\":false,\"display\":{\"provider\":\"yahux\",\"resource\":\"pmqnja\",\"operation\":\"ixjsprozvcputeg\",\"description\":\"wmfdatscmdvpjhul\"},\"origin\":\"system\",\"actionType\":\"Internal\"}],\"nextLink\":\"jozkrwfndiod\"}") + "{\"value\":[{\"name\":\"jbpzvgnwzsymg\",\"isDataAction\":false,\"display\":{\"provider\":\"yzkohdbihanuf\",\"resource\":\"cbjy\",\"operation\":\"git\",\"description\":\"qhabifpikxwcz\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"},{\"name\":\"q\",\"isDataAction\":false,\"display\":{\"provider\":\"y\",\"resource\":\"iwbybrkxvdumjg\",\"operation\":\"fwvuk\",\"description\":\"audccsnhs\"},\"origin\":\"user\",\"actionType\":\"Internal\"},{\"name\":\"hkryhtn\",\"isDataAction\":true,\"display\":{\"provider\":\"lokjyemkk\",\"resource\":\"ipjoxzjnchgejs\",\"operation\":\"dmailzydehojw\",\"description\":\"huxinpmqnj\"},\"origin\":\"user\",\"actionType\":\"Internal\"},{\"name\":\"sprozvcput\",\"isDataAction\":false,\"display\":{\"provider\":\"mfdatscmdvpj\",\"resource\":\"lsuuvmkjozkrwfnd\",\"operation\":\"djpslw\",\"description\":\"dpvwryoqpsoaccta\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}],\"nextLink\":\"ahbc\"}") .toObject(OperationListResult.class); - Assertions.assertEquals("jozkrwfndiod", model.nextLink()); + Assertions.assertEquals("ahbc", model.nextLink()); } } diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PermissionErrorTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PermissionErrorTests.java deleted file mode 100644 index 92d4e8abd9e2..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PermissionErrorTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.chaos.models.PermissionError; - -public final class PermissionErrorTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PermissionError model = BinaryData.fromString( - "{\"resourceId\":\"ziqgfuh\",\"missingPermissions\":[\"zruswh\",\"hczznvf\"],\"requiredPermissions\":[\"cjsxjww\",\"xzv\"],\"recommendedRoles\":[\"wmxqhndvnoamlds\",\"haohdjhhflzokxc\",\"xpelnjetagltsx\",\"atftgzpnpbsw\"],\"identity\":{\"objectId\":\"floccsrmozih\",\"tenantId\":\"ipgawtxx\"}}") - .toObject(PermissionError.class); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PermissionsFixSummaryTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PermissionsFixSummaryTests.java deleted file mode 100644 index 466934c63d51..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PermissionsFixSummaryTests.java +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.chaos.models.PermissionsFixSummary; - -public final class PermissionsFixSummaryTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PermissionsFixSummary model = BinaryData - .fromString( - "{\"totalRequired\":1510318129,\"succeeded\":1346038267,\"failed\":59722653,\"skipped\":167334646}") - .toObject(PermissionsFixSummary.class); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PhysicalToLogicalZoneMappingTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PhysicalToLogicalZoneMappingTests.java deleted file mode 100644 index 8e57326667ee..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PhysicalToLogicalZoneMappingTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.chaos.models.PhysicalToLogicalZoneMapping; - -public final class PhysicalToLogicalZoneMappingTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PhysicalToLogicalZoneMapping model - = BinaryData.fromString("{\"physicalZone\":\"uyilflqoiquvrehm\",\"logicalZone\":\"njhvsujztc\"}") - .toObject(PhysicalToLogicalZoneMapping.class); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessInnerTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessInnerTests.java deleted file mode 100644 index eaef882b6109..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessInnerTests.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.chaos.fluent.models.PrivateAccessInner; -import com.azure.resourcemanager.chaos.models.PrivateAccessProperties; -import com.azure.resourcemanager.chaos.models.PublicNetworkAccessOption; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class PrivateAccessInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateAccessInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Creating\",\"privateEndpointConnections\":[{\"properties\":{\"groupIds\":[\"dwbwhkszzcmrvexz\",\"vbtqgsfraoyzk\",\"owtlmnguxawqald\"],\"privateEndpoint\":{\"id\":\"uximerqfobw\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"bykutw\",\"actionsRequired\":\"hpagm\"},\"provisioningState\":\"Deleting\"},\"id\":\"dsnfdsdoakgtdl\",\"name\":\"kkze\",\"type\":\"dlhewp\"},{\"properties\":{\"groupIds\":[\"ttwvogvbbe\",\"dcngqqmoakufgmj\",\"rwr\"],\"privateEndpoint\":{\"id\":\"twaenuuzko\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"nrfdw\",\"actionsRequired\":\"uhhziuiefozbhdm\"},\"provisioningState\":\"Deleting\"},\"id\":\"zqhof\",\"name\":\"rmaequ\",\"type\":\"ah\"},{\"properties\":{\"groupIds\":[\"lfaoqzpiyylhaln\",\"whccs\",\"hka\"],\"privateEndpoint\":{\"id\":\"itqscywuggwoluhc\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"mhairsbrgzdwmsw\",\"actionsRequired\":\"pqwd\"},\"provisioningState\":\"Deleting\"},\"id\":\"cccnxqhuexmktt\",\"name\":\"stvlzywemhzrnc\",\"type\":\"dtclusiypb\"},{\"properties\":{\"groupIds\":[\"tg\",\"sl\"],\"privateEndpoint\":{\"id\":\"dcygqukyhejhz\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"fpel\",\"actionsRequired\":\"p\"},\"provisioningState\":\"Running\"},\"id\":\"r\",\"name\":\"qvujzraehtwdwrf\",\"type\":\"swibyr\"}],\"publicNetworkAccess\":\"Enabled\"},\"location\":\"h\",\"tags\":{\"c\":\"wpracstwitykhev\",\"jc\":\"edcpnmdyodnwzxl\",\"vvwxqi\":\"nhltiugcxn\"},\"id\":\"y\",\"name\":\"unyowxwl\",\"type\":\"djrkvfgbvfvpd\"}") - .toObject(PrivateAccessInner.class); - Assertions.assertEquals("h", model.location()); - Assertions.assertEquals("wpracstwitykhev", model.tags().get("c")); - Assertions.assertEquals(PublicNetworkAccessOption.ENABLED, model.properties().publicNetworkAccess()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateAccessInner model = new PrivateAccessInner().withLocation("h") - .withTags(mapOf("c", "wpracstwitykhev", "jc", "edcpnmdyodnwzxl", "vvwxqi", "nhltiugcxn")) - .withProperties(new PrivateAccessProperties().withPublicNetworkAccess(PublicNetworkAccessOption.ENABLED)); - model = BinaryData.fromObject(model).toObject(PrivateAccessInner.class); - Assertions.assertEquals("h", model.location()); - Assertions.assertEquals("wpracstwitykhev", model.tags().get("c")); - Assertions.assertEquals(PublicNetworkAccessOption.ENABLED, model.properties().publicNetworkAccess()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessListResultTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessListResultTests.java deleted file mode 100644 index 2282d3554ef6..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessListResultTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.chaos.implementation.models.PrivateAccessListResult; -import com.azure.resourcemanager.chaos.models.PublicNetworkAccessOption; -import org.junit.jupiter.api.Assertions; - -public final class PrivateAccessListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateAccessListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Running\",\"privateEndpointConnections\":[{\"properties\":{\"privateLinkServiceConnectionState\":{}},\"id\":\"lpqekf\",\"name\":\"nkhtjsyingw\",\"type\":\"qatmtdhtmdvy\"}],\"publicNetworkAccess\":\"Disabled\"},\"location\":\"dgszywkbirryuzh\",\"tags\":{\"nrvgoupmfiibfgg\":\"joqrvqqaatj\"},\"id\":\"ioolvrwxkvtkkgll\",\"name\":\"wjygvjayvblmhvk\",\"type\":\"uhbxvvy\"}],\"nextLink\":\"s\"}") - .toObject(PrivateAccessListResult.class); - Assertions.assertEquals("dgszywkbirryuzh", model.value().get(0).location()); - Assertions.assertEquals("joqrvqqaatj", model.value().get(0).tags().get("nrvgoupmfiibfgg")); - Assertions.assertEquals(PublicNetworkAccessOption.DISABLED, - model.value().get(0).properties().publicNetworkAccess()); - Assertions.assertEquals("s", model.nextLink()); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessPatchTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessPatchTests.java deleted file mode 100644 index 0ee07181e6c0..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessPatchTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.chaos.models.PrivateAccessPatch; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class PrivateAccessPatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateAccessPatch model - = BinaryData.fromString("{\"tags\":{\"kbwcc\":\"cr\"}}").toObject(PrivateAccessPatch.class); - Assertions.assertEquals("cr", model.tags().get("kbwcc")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateAccessPatch model = new PrivateAccessPatch().withTags(mapOf("kbwcc", "cr")); - model = BinaryData.fromObject(model).toObject(PrivateAccessPatch.class); - Assertions.assertEquals("cr", model.tags().get("kbwcc")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessPropertiesTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessPropertiesTests.java deleted file mode 100644 index a4f40aafc4c6..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessPropertiesTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.chaos.models.PrivateAccessProperties; -import com.azure.resourcemanager.chaos.models.PublicNetworkAccessOption; -import org.junit.jupiter.api.Assertions; - -public final class PrivateAccessPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateAccessProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Succeeded\",\"privateEndpointConnections\":[{\"properties\":{\"groupIds\":[\"j\"],\"privateEndpoint\":{\"id\":\"krribdeibqi\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"hvxndzwmkrefajpj\",\"actionsRequired\":\"wkqnyhg\"},\"provisioningState\":\"Succeeded\"},\"id\":\"jivfxzsjabib\",\"name\":\"ystawfsdjpvkvp\",\"type\":\"jxbkzbzkdvn\"},{\"properties\":{\"groupIds\":[\"udurgkakmokz\",\"jjklff\",\"mouwqlgzrfzeey\"],\"privateEndpoint\":{\"id\":\"zi\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"hqlbjbsybbq\",\"actionsRequired\":\"vtldgmfpgvmpip\"},\"provisioningState\":\"Succeeded\"},\"id\":\"haq\",\"name\":\"x\",\"type\":\"smwutwbdsrezpd\"},{\"properties\":{\"groupIds\":[\"uyowqkdwy\",\"i\"],\"privateEndpoint\":{\"id\":\"ircgpikpz\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"zanl\",\"actionsRequired\":\"xi\"},\"provisioningState\":\"Updating\"},\"id\":\"bzonok\",\"name\":\"xrjqcirgzpfrlazs\",\"type\":\"rnwoiindfp\"},{\"properties\":{\"groupIds\":[\"lwbtlhf\",\"sj\",\"dhszfjv\",\"bgofeljag\"],\"privateEndpoint\":{\"id\":\"qhl\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"iiojnal\",\"actionsRequired\":\"fk\"},\"provisioningState\":\"Updating\"},\"id\":\"ex\",\"name\":\"owueluqh\",\"type\":\"ahhxvrh\"}],\"publicNetworkAccess\":\"Disabled\"}") - .toObject(PrivateAccessProperties.class); - Assertions.assertEquals(PublicNetworkAccessOption.DISABLED, model.publicNetworkAccess()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateAccessProperties model - = new PrivateAccessProperties().withPublicNetworkAccess(PublicNetworkAccessOption.DISABLED); - model = BinaryData.fromObject(model).toObject(PrivateAccessProperties.class); - Assertions.assertEquals(PublicNetworkAccessOption.DISABLED, model.publicNetworkAccess()); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesCreateOrUpdateMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesCreateOrUpdateMockTests.java deleted file mode 100644 index b3753ca2bdd8..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesCreateOrUpdateMockTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.chaos.ChaosManager; -import com.azure.resourcemanager.chaos.models.PrivateAccess; -import com.azure.resourcemanager.chaos.models.PrivateAccessProperties; -import com.azure.resourcemanager.chaos.models.PublicNetworkAccessOption; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PrivateAccessesCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpointConnections\":[{\"properties\":{\"groupIds\":[\"ustcpoq\",\"avnwqj\",\"g\",\"knlejjjkxybwfd\"],\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Succeeded\"},\"id\":\"tensvkzykj\",\"name\":\"jknsxfwu\",\"type\":\"hcdpkupnqrmgj\"},{\"properties\":{\"groupIds\":[\"uwxeoiojfizf\",\"vkjzwfbcyaykm\",\"fz\",\"bfw\"],\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Creating\"},\"id\":\"dew\",\"name\":\"rsxkr\",\"type\":\"lbjazejww\"}],\"publicNetworkAccess\":\"Enabled\"},\"location\":\"y\",\"tags\":{\"qwjhqkbiwetpozyc\":\"hbrnnhjx\",\"ledynojpz\":\"qiqyhgfsetzlexbs\",\"ljselp\":\"uwfbzkkdtnhqsy\"},\"id\":\"pbafvafhlbylc\",\"name\":\"bevxrhyzd\",\"type\":\"wrso\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ChaosManager manager = ChaosManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PrivateAccess response = manager.privateAccesses() - .define("kfaoytehq") - .withRegion("smk") - .withExistingResourceGroup("hoygzcbyfq") - .withProperties(new PrivateAccessProperties().withPublicNetworkAccess(PublicNetworkAccessOption.ENABLED)) - .withTags( - mapOf("oygbdgwumgxd", "tbbaedorvvmqf", "bgd", "dhp", "vjsaqwotm", "xjd", "xaptefhexcgjok", "wllcolsr")) - .create(); - - Assertions.assertEquals("y", response.location()); - Assertions.assertEquals("hbrnnhjx", response.tags().get("qwjhqkbiwetpozyc")); - Assertions.assertEquals(PublicNetworkAccessOption.ENABLED, response.properties().publicNetworkAccess()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesGetAPrivateEndpointConnectionWithResponseMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesGetAPrivateEndpointConnectionWithResponseMockTests.java deleted file mode 100644 index 18e4d4a15e05..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesGetAPrivateEndpointConnectionWithResponseMockTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.chaos.ChaosManager; -import com.azure.resourcemanager.chaos.models.PrivateEndpointConnection; -import com.azure.resourcemanager.chaos.models.PrivateEndpointServiceConnectionStatus; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PrivateAccessesGetAPrivateEndpointConnectionWithResponseMockTests { - @Test - public void testGetAPrivateEndpointConnectionWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"groupIds\":[\"kiyfjjkbajbusc\"],\"privateEndpoint\":{\"id\":\"u\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"cblevpmc\",\"actionsRequired\":\"jy\"},\"provisioningState\":\"Updating\"},\"id\":\"lzgsjgkzzlt\",\"name\":\"fhbzffovwmbjlzq\",\"type\":\"czpgvdwnapfdq\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ChaosManager manager = ChaosManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PrivateEndpointConnection response = manager.privateAccesses() - .getAPrivateEndpointConnectionWithResponse("weyurkphyjd", "ravjuq", "brxmrgch", - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, - response.properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("cblevpmc", response.properties().privateLinkServiceConnectionState().description()); - Assertions.assertEquals("jy", response.properties().privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesGetByResourceGroupWithResponseMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index 10b34450bcec..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesGetByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.chaos.ChaosManager; -import com.azure.resourcemanager.chaos.models.PrivateAccess; -import com.azure.resourcemanager.chaos.models.PublicNetworkAccessOption; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PrivateAccessesGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Running\",\"privateEndpointConnections\":[{\"properties\":{\"groupIds\":[\"xnafbw\",\"ro\",\"htuov\"],\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Deleting\"},\"id\":\"rjtumghih\",\"name\":\"ve\",\"type\":\"mslclblyjxlt\"}],\"publicNetworkAccess\":\"Enabled\"},\"location\":\"scvsfxigctm\",\"tags\":{\"eukdqkkyih\":\"upbezqccydrt\"},\"id\":\"tg\",\"name\":\"qm\",\"type\":\"qzgwldoychil\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ChaosManager manager = ChaosManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PrivateAccess response = manager.privateAccesses() - .getByResourceGroupWithResponse("vnynkb", "etnjuhpsprkz", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("scvsfxigctm", response.location()); - Assertions.assertEquals("upbezqccydrt", response.tags().get("eukdqkkyih")); - Assertions.assertEquals(PublicNetworkAccessOption.ENABLED, response.properties().publicNetworkAccess()); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesGetPrivateLinkResourcesWithResponseMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesGetPrivateLinkResourcesWithResponseMockTests.java deleted file mode 100644 index fd49200c3570..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesGetPrivateLinkResourcesWithResponseMockTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.chaos.ChaosManager; -import com.azure.resourcemanager.chaos.models.PrivateLinkResourceListResult; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PrivateAccessesGetPrivateLinkResourcesWithResponseMockTests { - @Test - public void testGetPrivateLinkResourcesWithResponse() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"groupId\":\"ekaum\",\"requiredMembers\":[\"mbzmqk\",\"atbnxwbj\"],\"requiredZoneNames\":[\"birkfpksokdg\",\"gewi\",\"ym\",\"hbguzo\"],\"provisioningState\":\"Running\"},\"location\":\"wnf\",\"tags\":{\"ycyarnroohg\":\"hhqosmffjku\",\"ocnhzqrottjzcfyj\":\"abzoghktdpyczhco\"},\"id\":\"pt\",\"name\":\"rl\",\"type\":\"h\"},{\"properties\":{\"groupId\":\"qinfszpyglqd\",\"requiredMembers\":[\"jzralc\",\"pjby\"],\"requiredZoneNames\":[\"joqcjenkyhfqzvsq\",\"fxjelg\",\"mpzqjhhhq\",\"uwyvcacoyvi\"],\"provisioningState\":\"Creating\"},\"location\":\"zusjsz\",\"tags\":{\"vflnwyvqkxrerln\":\"cmnlzijiufehg\",\"fwxzutg\":\"ylyl\",\"yjtcdxabbujftab\":\"ztwhghmupg\"},\"id\":\"nbbklqpxzucafed\",\"name\":\"wwnlzafwxudgnh\",\"type\":\"ookrtalvnbw\"},{\"properties\":{\"groupId\":\"bemeluclvd\",\"requiredMembers\":[\"kyrdnqodx\",\"hhxhq\",\"aqnvzoqgyipemchg\",\"v\"],\"requiredZoneNames\":[\"uejdtxptlg\",\"wzhomewjjstl\"],\"provisioningState\":\"Canceled\"},\"location\":\"awmo\",\"tags\":{\"xrx\":\"ncznvodrrslblxyd\"},\"id\":\"vbxiwkgfbqlj\",\"name\":\"qkhychocok\",\"type\":\"lehu\"}],\"nextLink\":\"lrqff\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ChaosManager manager = ChaosManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PrivateLinkResourceListResult response = manager.privateAccesses() - .getPrivateLinkResourcesWithResponse("ujvaannggi", "cwkdtaaw", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("wnf", response.value().get(0).location()); - Assertions.assertEquals("hhqosmffjku", response.value().get(0).tags().get("ycyarnroohg")); - Assertions.assertEquals("birkfpksokdg", response.value().get(0).properties().requiredZoneNames().get(0)); - Assertions.assertEquals("lrqff", response.nextLink()); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesListByResourceGroupMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesListByResourceGroupMockTests.java deleted file mode 100644 index 44759b9b1895..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesListByResourceGroupMockTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.chaos.ChaosManager; -import com.azure.resourcemanager.chaos.models.PrivateAccess; -import com.azure.resourcemanager.chaos.models.PublicNetworkAccessOption; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PrivateAccessesListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"privateEndpointConnections\":[{\"properties\":{\"groupIds\":[\"rweft\",\"wqejpmvsse\"],\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Creating\"},\"id\":\"a\",\"name\":\"cxtczhupeukn\",\"type\":\"jduyyespydjfb\"}],\"publicNetworkAccess\":\"Enabled\"},\"location\":\"hhulrtywikdm\",\"tags\":{\"auacdixmxufrsr\":\"kuflgbh\",\"bvjhvefgwbmqj\":\"jqgdkfnozoeo\",\"ulpzealb\":\"hntasfaymx\",\"mbtsuahxsg\":\"qkyojwyvf\"},\"id\":\"jcmmzrrscub\",\"name\":\"wsdrnpxqwodif\",\"type\":\"jxcjrmmuabwib\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ChaosManager manager = ChaosManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PagedIterable response = manager.privateAccesses() - .listByResourceGroup("cecfehuwaoaguh", "cqlliz", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("hhulrtywikdm", response.iterator().next().location()); - Assertions.assertEquals("kuflgbh", response.iterator().next().tags().get("auacdixmxufrsr")); - Assertions.assertEquals(PublicNetworkAccessOption.ENABLED, - response.iterator().next().properties().publicNetworkAccess()); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesListMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesListMockTests.java deleted file mode 100644 index 7da59fdbd298..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesListMockTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.chaos.ChaosManager; -import com.azure.resourcemanager.chaos.models.PrivateAccess; -import com.azure.resourcemanager.chaos.models.PublicNetworkAccessOption; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PrivateAccessesListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Running\",\"privateEndpointConnections\":[{\"properties\":{\"groupIds\":[\"mwineof\",\"fkak\",\"oldtvevboclzhz\",\"knyuxgvttxpn\"],\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{},\"provisioningState\":\"Succeeded\"},\"id\":\"amrdixtrekidswys\",\"name\":\"br\",\"type\":\"ffg\"}],\"publicNetworkAccess\":\"Enabled\"},\"location\":\"kutvlxhrpqhv\",\"tags\":{\"bcdsziryrandoyp\":\"couqehb\",\"rmkfqlwxldykals\":\"blto\",\"olnjpnnbmjksibj\":\"g\",\"ahmrnadzyqegxyi\":\"sjjx\"},\"id\":\"pinbmhwbjijkgqxn\",\"name\":\"mbk\",\"type\":\"znj\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ChaosManager manager = ChaosManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PagedIterable response - = manager.privateAccesses().list("jogjonmc", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("kutvlxhrpqhv", response.iterator().next().location()); - Assertions.assertEquals("couqehb", response.iterator().next().tags().get("bcdsziryrandoyp")); - Assertions.assertEquals(PublicNetworkAccessOption.ENABLED, - response.iterator().next().properties().publicNetworkAccess()); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesListPrivateEndpointConnectionsMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesListPrivateEndpointConnectionsMockTests.java deleted file mode 100644 index c79918e65851..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateAccessesListPrivateEndpointConnectionsMockTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.chaos.ChaosManager; -import com.azure.resourcemanager.chaos.models.PrivateEndpointConnection; -import com.azure.resourcemanager.chaos.models.PrivateEndpointServiceConnectionStatus; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PrivateAccessesListPrivateEndpointConnectionsMockTests { - @Test - public void testListPrivateEndpointConnections() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"groupIds\":[\"y\",\"leseyqrhvyeldo\",\"jv\"],\"privateEndpoint\":{\"id\":\"iswskuk\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"bvwispkx\",\"actionsRequired\":\"txfkndlqvt\"},\"provisioningState\":\"Canceled\"},\"id\":\"gmmbu\",\"name\":\"tywatmqaq\",\"type\":\"ueatgroe\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ChaosManager manager = ChaosManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PagedIterable response = manager.privateAccesses() - .listPrivateEndpointConnections("owftptnuwjtks", "h", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.APPROVED, - response.iterator().next().properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("bvwispkx", - response.iterator().next().properties().privateLinkServiceConnectionState().description()); - Assertions.assertEquals("txfkndlqvt", - response.iterator().next().properties().privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateEndpointConnectionInnerTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateEndpointConnectionInnerTests.java deleted file mode 100644 index 421cd361854d..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateEndpointConnectionInnerTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.chaos.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.chaos.models.PrivateEndpointServiceConnectionStatus; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointConnectionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointConnectionInner model = BinaryData.fromString( - "{\"properties\":{\"groupIds\":[\"g\",\"wspughftqsxhqx\",\"j\"],\"privateEndpoint\":{\"id\":\"ndxdigrjguufzdm\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"fi\",\"actionsRequired\":\"hbotzingamvppho\"},\"provisioningState\":\"Deleting\"},\"id\":\"udphqamvdkfwyn\",\"name\":\"cvtbv\",\"type\":\"ayhmtnvyqiatkz\"}") - .toObject(PrivateEndpointConnectionInner.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, - model.properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("fi", model.properties().privateLinkServiceConnectionState().description()); - Assertions.assertEquals("hbotzingamvppho", - model.properties().privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateEndpointConnectionListResultTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateEndpointConnectionListResultTests.java deleted file mode 100644 index 22e45d33cb75..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateEndpointConnectionListResultTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.chaos.implementation.models.PrivateEndpointConnectionListResult; -import com.azure.resourcemanager.chaos.models.PrivateEndpointServiceConnectionStatus; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointConnectionListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointConnectionListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"groupIds\":[\"jmfxumvf\",\"luyovwxnbkfezzx\",\"cy\"],\"privateEndpoint\":{\"id\":\"dgirujbzbom\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"tdcqvpniyuj\",\"actionsRequired\":\"ylwdshfssn\"},\"provisioningState\":\"Failed\"},\"id\":\"efr\",\"name\":\"msgaoj\",\"type\":\"mwn\"},{\"properties\":{\"groupIds\":[\"rfh\",\"rctym\",\"xoftpipiwyczu\"],\"privateEndpoint\":{\"id\":\"cpqjlihhyu\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"asdvl\",\"actionsRequired\":\"wdgzxulucv\"},\"provisioningState\":\"Creating\"},\"id\":\"sreuzvxurisjnh\",\"name\":\"ytxifqjzgxmrh\",\"type\":\"blwpcesutrgj\"},{\"properties\":{\"groupIds\":[\"utpwoqhihejqgw\",\"pnfqntcyp\",\"xjvfoimwksl\"],\"privateEndpoint\":{\"id\":\"izjx\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"ceacvlhvygdy\",\"actionsRequired\":\"umrtwnawjsl\"},\"provisioningState\":\"Running\"},\"id\":\"ojgcyzt\",\"name\":\"fmznba\",\"type\":\"qphchqnrnrpxehuw\"}],\"nextLink\":\"k\"}") - .toObject(PrivateEndpointConnectionListResult.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, - model.value().get(0).properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("tdcqvpniyuj", - model.value().get(0).properties().privateLinkServiceConnectionState().description()); - Assertions.assertEquals("ylwdshfssn", - model.value().get(0).properties().privateLinkServiceConnectionState().actionsRequired()); - Assertions.assertEquals("k", model.nextLink()); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateEndpointConnectionPropertiesTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateEndpointConnectionPropertiesTests.java deleted file mode 100644 index e093a0826401..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateEndpointConnectionPropertiesTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.chaos.models.PrivateEndpointConnectionProperties; -import com.azure.resourcemanager.chaos.models.PrivateEndpointServiceConnectionStatus; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointConnectionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointConnectionProperties model = BinaryData.fromString( - "{\"groupIds\":[\"npwzcjaes\",\"vvsccyajguq\",\"hwyg\",\"lvdnkfx\"],\"privateEndpoint\":{\"id\":\"mdwzrmuhapfcqdps\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"psvuoymgc\",\"actionsRequired\":\"lvez\"},\"provisioningState\":\"Updating\"}") - .toObject(PrivateEndpointConnectionProperties.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.APPROVED, - model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("psvuoymgc", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("lvez", model.privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateEndpointTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateEndpointTests.java deleted file mode 100644 index 46aa8e694f5c..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateEndpointTests.java +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.chaos.models.PrivateEndpoint; - -public final class PrivateEndpointTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpoint model = BinaryData.fromString("{\"id\":\"lmfeokerq\"}").toObject(PrivateEndpoint.class); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateLinkResourceListResultInnerTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateLinkResourceListResultInnerTests.java deleted file mode 100644 index 1b7eb281eed9..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateLinkResourceListResultInnerTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.chaos.fluent.models.PrivateLinkResourceListResultInner; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkResourceListResultInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkResourceListResultInner model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"groupId\":\"yrqufegxuvwz\",\"requiredMembers\":[\"hlmctlpdngitvgb\",\"hrixkwmy\",\"jejveg\"],\"requiredZoneNames\":[\"pna\",\"xexccbdreaxhcexd\",\"rvqahqkghtpwi\",\"nhyjsv\"],\"provisioningState\":\"Succeeded\"},\"location\":\"z\",\"tags\":{\"t\":\"oowvrv\",\"gfipnsxk\":\"jqppyostronzmy\"},\"id\":\"cwaekrrjre\",\"name\":\"fxtsgum\",\"type\":\"jglikkxwslolb\"},{\"properties\":{\"groupId\":\"vuzlm\",\"requiredMembers\":[\"lfktgplcrpwjxe\"],\"requiredZoneNames\":[\"igbrnjw\"],\"provisioningState\":\"Updating\"},\"location\":\"nbsazejjoqkag\",\"tags\":{\"xdtnkdmkqjjlw\":\"xttaugzxnfaaz\",\"aysjkixqtnqttez\":\"envrkpyouaibrebq\"},\"id\":\"wfff\",\"name\":\"akpjpqqmtedlt\",\"type\":\"mjihyeozphv\"},{\"properties\":{\"groupId\":\"uyqncygupkvipmd\",\"requiredMembers\":[\"xqupevzhf\"],\"requiredZoneNames\":[\"txhojujb\",\"pelmcuvhixbjxyf\",\"n\"],\"provisioningState\":\"Succeeded\"},\"location\":\"ool\",\"tags\":{\"iwkkbn\":\"p\",\"rd\":\"jrywvtylbfpnc\",\"htywubxcbihwq\":\"iwii\",\"wjchrdg\":\"nfdn\"},\"id\":\"ihxumwctondzj\",\"name\":\"uu\",\"type\":\"fdlwg\"}],\"nextLink\":\"tsbwtovvtgse\"}") - .toObject(PrivateLinkResourceListResultInner.class); - Assertions.assertEquals("z", model.value().get(0).location()); - Assertions.assertEquals("oowvrv", model.value().get(0).tags().get("t")); - Assertions.assertEquals("pna", model.value().get(0).properties().requiredZoneNames().get(0)); - Assertions.assertEquals("tsbwtovvtgse", model.nextLink()); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateLinkResourcePropertiesTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateLinkResourcePropertiesTests.java deleted file mode 100644 index 8de0dbbce740..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateLinkResourcePropertiesTests.java +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.chaos.models.PrivateLinkResourceProperties; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkResourcePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkResourceProperties model = BinaryData.fromString( - "{\"groupId\":\"tkfa\",\"requiredMembers\":[\"pqgik\",\"zirtxdyuxzejntps\",\"wgioilqukry\",\"xtqmieoxor\"],\"requiredZoneNames\":[\"f\",\"yaomtb\",\"hhavgrvkffovjz\"],\"provisioningState\":\"Running\"}") - .toObject(PrivateLinkResourceProperties.class); - Assertions.assertEquals("f", model.requiredZoneNames().get(0)); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateLinkResourceTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateLinkResourceTests.java deleted file mode 100644 index a35714aadd2a..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateLinkResourceTests.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.chaos.models.PrivateLinkResource; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkResourceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkResource model = BinaryData.fromString( - "{\"properties\":{\"groupId\":\"qfi\",\"requiredMembers\":[\"qknp\"],\"requiredZoneNames\":[\"nepttwqmsni\",\"fcdmqnrojlpijn\",\"rxfrddhc\"],\"provisioningState\":\"Creating\"},\"location\":\"zzronasx\",\"tags\":{\"tw\":\"ozqyzh\",\"lgnyhmo\":\"sgogczhonnxk\",\"h\":\"sxkkg\",\"hqxvcxgfrpdsofbs\":\"rghxjb\"},\"id\":\"rnsvbuswd\",\"name\":\"z\",\"type\":\"ybycnunvj\"}") - .toObject(PrivateLinkResource.class); - Assertions.assertEquals("zzronasx", model.location()); - Assertions.assertEquals("ozqyzh", model.tags().get("tw")); - Assertions.assertEquals("nepttwqmsni", model.properties().requiredZoneNames().get(0)); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateLinkServiceConnectionStateTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateLinkServiceConnectionStateTests.java deleted file mode 100644 index e41d38a0d792..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/PrivateLinkServiceConnectionStateTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.chaos.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.chaos.models.PrivateLinkServiceConnectionState; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkServiceConnectionStateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkServiceConnectionState model = BinaryData - .fromString("{\"status\":\"Pending\",\"description\":\"kobopgxed\",\"actionsRequired\":\"wep\"}") - .toObject(PrivateLinkServiceConnectionState.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, model.status()); - Assertions.assertEquals("kobopgxed", model.description()); - Assertions.assertEquals("wep", model.actionsRequired()); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/RecommendationTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/RecommendationTests.java deleted file mode 100644 index 6fcd16cb3cc6..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/RecommendationTests.java +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.chaos.models.Recommendation; - -public final class RecommendationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Recommendation model = BinaryData - .fromString( - "{\"recommendationStatus\":\"EvaluationCancelled\",\"evaluationRunAt\":\"2021-09-26T09:40:12Z\"}") - .toObject(Recommendation.class); - } -} 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 538a06ac65bc..6026544921ea 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 @@ -16,17 +16,18 @@ public final class ResourceIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ResourceIdentity model = BinaryData.fromString( - "{\"principalId\":\"leggzfbu\",\"tenantId\":\"mvfaxkffeiith\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"burvjxxjnspy\":{\"principalId\":\"yvshxmz\",\"clientId\":\"bzoggigrx\"}}}") + "{\"principalId\":\"sllr\",\"tenantId\":\"vdfwatkpn\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"sovmyokacspkwl\":{\"principalId\":\"xbczwtruwiqz\",\"clientId\":\"j\"},\"rsa\":{\"principalId\":\"dobpxjmflbvvn\",\"clientId\":\"rkcciwwzjuqk\"},\"uugidyjrrfby\":{\"principalId\":\"wkuofoskghsauu\",\"clientId\":\"jmvxie\"}}}") .toObject(ResourceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.type()); + Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.type()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ResourceIdentity model = new ResourceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("burvjxxjnspy", new UserAssignedIdentity())); + ResourceIdentity model = new ResourceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf("sovmyokacspkwl", new UserAssignedIdentity(), "rsa", + new UserAssignedIdentity(), "uugidyjrrfby", new UserAssignedIdentity())); model = BinaryData.fromObject(model).toObject(ResourceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.type()); + Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.type()); } // Use "Map.of" if available diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/RunAfterTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/RunAfterTests.java deleted file mode 100644 index 03004b972625..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/RunAfterTests.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.chaos.models.ActionDependency; -import com.azure.resourcemanager.chaos.models.ActionDependencyType; -import com.azure.resourcemanager.chaos.models.ActionLifecycle; -import com.azure.resourcemanager.chaos.models.RunAfter; -import com.azure.resourcemanager.chaos.models.RunAfterBehavior; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RunAfterTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RunAfter model = BinaryData.fromString( - "{\"behavior\":\"Any\",\"items\":[{\"type\":\"Action\",\"name\":\"cmjdmspof\",\"onActionLifecycle\":\"Skipped\"},{\"type\":\"Action\",\"name\":\"hryl\",\"onActionLifecycle\":\"Running\"},{\"type\":\"Action\",\"name\":\"rz\",\"onActionLifecycle\":\"Success\"},{\"type\":\"Action\",\"name\":\"edm\",\"onActionLifecycle\":\"Start\"}]}") - .toObject(RunAfter.class); - Assertions.assertEquals(RunAfterBehavior.ANY, model.behavior()); - Assertions.assertEquals(ActionDependencyType.ACTION, model.items().get(0).type()); - Assertions.assertEquals("cmjdmspof", model.items().get(0).name()); - Assertions.assertEquals(ActionLifecycle.SKIPPED, model.items().get(0).onActionLifecycle()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RunAfter model = new RunAfter().withBehavior(RunAfterBehavior.ANY) - .withItems(Arrays.asList( - new ActionDependency().withType(ActionDependencyType.ACTION) - .withName("cmjdmspof") - .withOnActionLifecycle(ActionLifecycle.SKIPPED), - new ActionDependency().withType(ActionDependencyType.ACTION) - .withName("hryl") - .withOnActionLifecycle(ActionLifecycle.RUNNING), - new ActionDependency().withType(ActionDependencyType.ACTION) - .withName("rz") - .withOnActionLifecycle(ActionLifecycle.SUCCESS), - new ActionDependency().withType(ActionDependencyType.ACTION) - .withName("edm") - .withOnActionLifecycle(ActionLifecycle.START))); - model = BinaryData.fromObject(model).toObject(RunAfter.class); - Assertions.assertEquals(RunAfterBehavior.ANY, model.behavior()); - Assertions.assertEquals(ActionDependencyType.ACTION, model.items().get(0).type()); - Assertions.assertEquals("cmjdmspof", model.items().get(0).name()); - Assertions.assertEquals(ActionLifecycle.SKIPPED, model.items().get(0).onActionLifecycle()); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsExecuteWithResponseMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsExecuteWithResponseMockTests.java deleted file mode 100644 index b6752f417502..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ScenarioConfigurationsExecuteWithResponseMockTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.chaos.ChaosManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ScenarioConfigurationsExecuteWithResponseMockTests { - @Test - public void testExecuteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 202, responseStr.getBytes(StandardCharsets.UTF_8))); - ChaosManager manager = ChaosManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - manager.scenarioConfigurations() - .executeWithResponse("ciatxtjrrl", "mdskjhhxdlajfoxc", "scv", "lxlhuavkrm", - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ScenarioEvaluationResultItemTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ScenarioEvaluationResultItemTests.java deleted file mode 100644 index 06fbc23c3580..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ScenarioEvaluationResultItemTests.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.chaos.models.RecommendationStatus; -import com.azure.resourcemanager.chaos.models.ScenarioEvaluationResultItem; -import org.junit.jupiter.api.Assertions; - -public final class ScenarioEvaluationResultItemTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScenarioEvaluationResultItem model - = BinaryData.fromString("{\"scenarioName\":\"asiibmiybnnust\",\"evaluationResult\":\"NotEvaluated\"}") - .toObject(ScenarioEvaluationResultItem.class); - Assertions.assertEquals("asiibmiybnnust", model.scenarioName()); - Assertions.assertEquals(RecommendationStatus.NOT_EVALUATED, model.evaluationResult()); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ScenarioParameterTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ScenarioParameterTests.java deleted file mode 100644 index 07aafbaadee0..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ScenarioParameterTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.chaos.models.ParameterType; -import com.azure.resourcemanager.chaos.models.ScenarioParameter; -import org.junit.jupiter.api.Assertions; - -public final class ScenarioParameterTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScenarioParameter model = BinaryData.fromString( - "{\"name\":\"embnkbw\",\"type\":\"array\",\"default\":\"xk\",\"required\":true,\"description\":\"ihebwtsw\"}") - .toObject(ScenarioParameter.class); - Assertions.assertEquals("embnkbw", model.name()); - Assertions.assertEquals(ParameterType.ARRAY, model.type()); - Assertions.assertEquals("xk", model.defaultProperty()); - Assertions.assertTrue(model.required()); - Assertions.assertEquals("ihebwtsw", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScenarioParameter model = new ScenarioParameter().withName("embnkbw") - .withType(ParameterType.ARRAY) - .withDefaultProperty("xk") - .withRequired(true) - .withDescription("ihebwtsw"); - model = BinaryData.fromObject(model).toObject(ScenarioParameter.class); - Assertions.assertEquals("embnkbw", model.name()); - Assertions.assertEquals(ParameterType.ARRAY, model.type()); - Assertions.assertEquals("xk", model.defaultProperty()); - Assertions.assertTrue(model.required()); - Assertions.assertEquals("ihebwtsw", model.description()); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ScenarioRunResourceTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ScenarioRunResourceTests.java deleted file mode 100644 index db6ed7e1d0c0..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ScenarioRunResourceTests.java +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.chaos.models.ScenarioRunResource; - -public final class ScenarioRunResourceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScenarioRunResource model = BinaryData.fromString("{\"id\":\"ze\"}").toObject(ScenarioRunResource.class); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ScenarioRunSummaryActionTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ScenarioRunSummaryActionTests.java deleted file mode 100644 index 48bb5ac5f869..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ScenarioRunSummaryActionTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.chaos.models.ScenarioRunSummaryAction; - -public final class ScenarioRunSummaryActionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScenarioRunSummaryAction model = BinaryData.fromString( - "{\"resources\":[{\"id\":\"gnoxuztrksx\"}],\"actionUrn\":\"pndfcpfnznt\",\"state\":\"Starting\",\"startedAt\":\"2021-05-15T18:07:57Z\",\"completedAt\":\"2021-01-02T03:51:08Z\"}") - .toObject(ScenarioRunSummaryAction.class); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ScenarioRunsCancelWithResponseMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ScenarioRunsCancelWithResponseMockTests.java deleted file mode 100644 index c255924c4db8..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ScenarioRunsCancelWithResponseMockTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.chaos.ChaosManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ScenarioRunsCancelWithResponseMockTests { - @Test - public void testCancelWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 202, responseStr.getBytes(StandardCharsets.UTF_8))); - ChaosManager manager = ChaosManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - manager.scenarioRuns() - .cancelWithResponse("ev", "wmseharxifvqn", "x", "mbpjptnvwjh", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ScenariosDeleteWithResponseMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ScenariosDeleteWithResponseMockTests.java deleted file mode 100644 index 5f674aedd1b9..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ScenariosDeleteWithResponseMockTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.chaos.ChaosManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ScenariosDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ChaosManager manager = ChaosManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - manager.scenarios() - .deleteWithResponse("ofltfnnxrkadjfy", "nfmuiiiripf", "hykfkxbb", com.azure.core.util.Context.NONE); - - } -} 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 dfc15db003f4..fda6d8f160c0 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 @@ -11,7 +11,7 @@ public final class StepStatusTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StepStatus model = BinaryData.fromString( - "{\"stepName\":\"iohgwxrtfud\",\"stepId\":\"pxgy\",\"status\":\"gvr\",\"branches\":[{\"branchName\":\"k\",\"branchId\":\"ghimdblx\",\"status\":\"imfnjhfjx\",\"actions\":[{\"actionName\":\"kkfoqr\",\"actionId\":\"fkzikfj\",\"status\":\"n\",\"startTime\":\"2021-03-26T11:41:44Z\",\"endTime\":\"2021-04-16T02:34:29Z\",\"targets\":[{},{},{}]},{\"actionName\":\"elpcirelsfeaenwa\",\"actionId\":\"atklddxbjhwuaa\",\"status\":\"zjosp\",\"startTime\":\"2021-03-30T14:01:12Z\",\"endTime\":\"2021-10-16T17:22:18Z\",\"targets\":[{},{},{}]},{\"actionName\":\"v\",\"actionId\":\"glrvimjwosytxi\",\"status\":\"skfc\",\"startTime\":\"2021-03-03T12:07:05Z\",\"endTime\":\"2021-11-11T13:45:02Z\",\"targets\":[{},{},{},{}]}]},{\"branchName\":\"ke\",\"branchId\":\"ikh\",\"status\":\"fjhdg\",\"actions\":[{\"actionName\":\"bdunygaeqid\",\"actionId\":\"fatpxllrxcyjmoa\",\"status\":\"uvarmywdmjsjq\",\"startTime\":\"2021-07-03T14:18:15Z\",\"endTime\":\"2021-07-26T10:21:21Z\",\"targets\":[{},{}]},{\"actionName\":\"wlycoduhpkxkg\",\"actionId\":\"areqna\",\"status\":\"qugjhkycube\",\"startTime\":\"2021-03-22T14:35:21Z\",\"endTime\":\"2021-04-18T16:03:28Z\",\"targets\":[{},{},{}]},{\"actionName\":\"qmzqalkrmnjijpx\",\"actionId\":\"q\",\"status\":\"dfnbyxbaaabjyv\",\"startTime\":\"2021-10-17T00:26:42Z\",\"endTime\":\"2021-08-20T18:15:33Z\",\"targets\":[{},{},{}]}]},{\"branchName\":\"rtuzqogs\",\"branchId\":\"nevfdnw\",\"status\":\"mewzsyyc\",\"actions\":[{\"actionName\":\"oibjudpfrxtrthz\",\"actionId\":\"ytdw\",\"status\":\"brqubp\",\"startTime\":\"2021-06-19T07:52:19Z\",\"endTime\":\"2021-08-03T15:35:30Z\",\"targets\":[{}]},{\"actionName\":\"ivpdtiir\",\"actionId\":\"d\",\"status\":\"axoruzfgsquy\",\"startTime\":\"2021-03-18T06:01:03Z\",\"endTime\":\"2020-12-29T20:04:23Z\",\"targets\":[{},{}]},{\"actionName\":\"tramxjez\",\"actionId\":\"wnwxuqlcvyd\",\"status\":\"atdooaojkniod\",\"startTime\":\"2021-04-19T12:22:56Z\",\"endTime\":\"2021-09-16T01:10:50Z\",\"targets\":[{}]},{\"actionName\":\"jhemms\",\"actionId\":\"dkcrodt\",\"status\":\"nfwjlfltkacjvefk\",\"startTime\":\"2021-05-26T04:23:15Z\",\"endTime\":\"2021-04-07T03:26:36Z\",\"targets\":[{},{},{},{}]}]},{\"branchName\":\"kfpagao\",\"branchId\":\"ulpqblylsyxkqjn\",\"status\":\"ervtiagxs\",\"actions\":[{\"actionName\":\"e\",\"actionId\":\"sbzkf\",\"status\":\"eyvpnqicvinvkj\",\"startTime\":\"2021-10-15T12:56:31Z\",\"endTime\":\"2021-11-21T15:56:39Z\",\"targets\":[{},{},{},{}]},{\"actionName\":\"kzclewyh\",\"actionId\":\"wp\",\"status\":\"tzpofncckwyfzq\",\"startTime\":\"2021-07-28T19:48:05Z\",\"endTime\":\"2021-09-11T06:40:57Z\",\"targets\":[{}]},{\"actionName\":\"a\",\"actionId\":\"feqztppriol\",\"status\":\"rjaltolmncw\",\"startTime\":\"2021-10-18T01:05:02Z\",\"endTime\":\"2021-11-07T16:13:30Z\",\"targets\":[{},{},{},{}]}]}]}") + "{\"stepName\":\"exkpzksmondjmq\",\"stepId\":\"vypomgkopkwho\",\"status\":\"pajqgxysm\",\"branches\":[{\"branchName\":\"qfqvmkc\",\"branchId\":\"zapvhelx\",\"status\":\"glyatddckcbcuej\",\"actions\":[{\"actionName\":\"ciqibrhosx\",\"actionId\":\"qrhzoymibmrqyib\",\"status\":\"wfluszdt\",\"startTime\":\"2021-02-19T01:46:27Z\",\"endTime\":\"2021-03-03T03:28:30Z\",\"targets\":[{},{}]}]},{\"branchName\":\"yvoqa\",\"branchId\":\"iexpbtgiwbwo\",\"status\":\"washr\",\"actions\":[{\"actionName\":\"cnqxwbpokulpi\",\"actionId\":\"waasip\",\"status\":\"iobyu\",\"startTime\":\"2021-11-02T07:24:48Z\",\"endTime\":\"2021-08-02T06:07:15Z\",\"targets\":[{},{},{},{}]},{\"actionName\":\"wcciuqgbdbu\",\"actionId\":\"uvfbtkuwh\",\"status\":\"hykojoxafnndlpic\",\"startTime\":\"2021-09-25T08:27:56Z\",\"endTime\":\"2021-11-18T02:48:52Z\",\"targets\":[{},{},{},{}]}]}]}") .toObject(StepStatus.class); } } 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 17a1f779e4d8..5979ecf5797f 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 @@ -15,19 +15,19 @@ public final class TargetInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TargetInner model = BinaryData.fromString( - "{\"properties\":{\"i\":\"\\\"datafpdvhpfxxypi\\\"\",\"inuvamiheogn\":\"\\\"datamayhuybbkpodepoo\\\"\"},\"location\":\"xzxtheo\",\"id\":\"si\",\"name\":\"yevc\",\"type\":\"iqihn\"}") + "{\"properties\":{\"podepoo\":\"\\\"datanmayhuybb\\\"\"},\"location\":\"nuvamiheogna\",\"id\":\"zxtheotusivyevcc\",\"name\":\"qi\",\"type\":\"nhungbw\"}") .toObject(TargetInner.class); - Assertions.assertEquals("xzxtheo", model.location()); + Assertions.assertEquals("nuvamiheogna", model.location()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { TargetInner model = new TargetInner() - .withProperties(mapOf("i", BinaryData.fromBytes("\"datafpdvhpfxxypi\"".getBytes(StandardCharsets.UTF_8)), - "inuvamiheogn", BinaryData.fromBytes("\"datamayhuybbkpodepoo\"".getBytes(StandardCharsets.UTF_8)))) - .withLocation("xzxtheo"); + .withProperties( + mapOf("podepoo", BinaryData.fromBytes("\"datanmayhuybb\"".getBytes(StandardCharsets.UTF_8)))) + .withLocation("nuvamiheogna"); model = BinaryData.fromObject(model).toObject(TargetInner.class); - Assertions.assertEquals("xzxtheo", model.location()); + Assertions.assertEquals("nuvamiheogna", 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 6a6d83bdba3b..a4dcc7e34ec5 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 @@ -12,9 +12,9 @@ public final class TargetListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TargetListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"gxg\":\"\\\"datagbwjzrnf\\\"\",\"fublj\":\"\\\"dataspemvtzfk\\\"\"},\"location\":\"xqeofjaeqjhqjba\",\"id\":\"msmjqulngsntn\",\"name\":\"ybkzgcwr\",\"type\":\"clxxwrljdo\"}],\"nextLink\":\"kcqvkocrc\"}") + "{\"value\":[{\"properties\":{\"kufubljo\":\"\\\"datanfygxgispemvtz\\\"\",\"v\":\"\\\"dataxqeofjaeqjhqjba\\\"\",\"zgcwrw\":\"\\\"datasmjqulngsntnbyb\\\"\"},\"location\":\"xxwr\",\"id\":\"douskcqvkocrcjdk\",\"name\":\"tnhxbn\",\"type\":\"biksq\"}],\"nextLink\":\"lssai\"}") .toObject(TargetListResult.class); - Assertions.assertEquals("xqeofjaeqjhqjba", model.value().get(0).location()); - Assertions.assertEquals("kcqvkocrc", model.nextLink()); + Assertions.assertEquals("xxwr", model.value().get(0).location()); + Assertions.assertEquals("lssai", model.nextLink()); } } 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 3c2c8ac34066..7e67c4688622 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,18 +12,17 @@ public final class TargetReferenceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - TargetReference model = BinaryData.fromString("{\"type\":\"ChaosTarget\",\"id\":\"jhtxfvgxbfsmxne\"}") - .toObject(TargetReference.class); + TargetReference model + = BinaryData.fromString("{\"type\":\"ChaosTarget\",\"id\":\"pgn\"}").toObject(TargetReference.class); Assertions.assertEquals(TargetReferenceType.CHAOS_TARGET, model.type()); - Assertions.assertEquals("jhtxfvgxbfsmxne", model.id()); + Assertions.assertEquals("pgn", model.id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - TargetReference model - = new TargetReference().withType(TargetReferenceType.CHAOS_TARGET).withId("jhtxfvgxbfsmxne"); + TargetReference model = new TargetReference().withType(TargetReferenceType.CHAOS_TARGET).withId("pgn"); model = BinaryData.fromObject(model).toObject(TargetReference.class); Assertions.assertEquals(TargetReferenceType.CHAOS_TARGET, model.type()); - Assertions.assertEquals("jhtxfvgxbfsmxne", model.id()); + Assertions.assertEquals("pgn", 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 f919d0a53d7b..ff94acf2f034 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,7 +11,7 @@ public final class TargetTypeInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TargetTypeInner model = BinaryData.fromString( - "{\"properties\":{\"displayName\":\"oxslh\",\"description\":\"hlabrq\",\"propertiesSchema\":\"kzjcjbtrgae\",\"resourceTypes\":[\"ib\"]},\"id\":\"jj\",\"name\":\"toqbeitpkxztmoob\",\"type\":\"lftidgfcwqmpim\"}") + "{\"properties\":{\"displayName\":\"kdmtncvokotll\",\"description\":\"yhgsy\",\"propertiesSchema\":\"ogjltdtbnnhad\",\"resourceTypes\":[\"rkvcikhnvpa\",\"qgxqquezikyw\",\"gxk\"]},\"id\":\"la\",\"name\":\"melwuipiccjz\",\"type\":\"z\"}") .toObject(TargetTypeInner.class); } } 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 857991035f71..62216d800263 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 @@ -12,8 +12,8 @@ public final class TargetTypeListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TargetTypeListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"ltlwtjjguktalhs\",\"description\":\"kcdmxzrpoaimln\",\"propertiesSchema\":\"aaomylweazu\",\"resourceTypes\":[\"ethwwnpjhlfz\",\"wpchwahf\"]},\"id\":\"usnfepgfewet\",\"name\":\"l\",\"type\":\"xgncxyk\"},{\"properties\":{\"displayName\":\"djhlimm\",\"description\":\"x\",\"propertiesSchema\":\"bcporxvxcjzhqizx\",\"resourceTypes\":[\"tgqscjavftjuh\",\"qaz\",\"mtggu\",\"pijrajcivmmghf\"]},\"id\":\"iwrxgkn\",\"name\":\"uvyinzqodfvpgs\",\"type\":\"oxgsgbpfgzdjtx\"},{\"properties\":{\"displayName\":\"flbqvgaq\",\"description\":\"gafcqu\",\"propertiesSchema\":\"dvetnws\",\"resourceTypes\":[\"tnwlduycv\"]},\"id\":\"hyrmewipmvekdx\",\"name\":\"kuqgsjjxundxgket\",\"type\":\"zhhzjhfjmhvvmu\"}],\"nextLink\":\"pmuneqsx\"}") + "{\"value\":[{\"properties\":{\"displayName\":\"gvr\",\"description\":\"npkukghimdblx\",\"propertiesSchema\":\"imfnjhfjx\",\"resourceTypes\":[\"zk\",\"foqreyfkzik\",\"jawneaiv\"]},\"id\":\"czelpcirel\",\"name\":\"feaenwab\",\"type\":\"atklddxbjhwuaa\"},{\"properties\":{\"displayName\":\"zjosp\",\"description\":\"oulpjrv\",\"propertiesSchema\":\"glrvimjwosytxi\",\"resourceTypes\":[\"kfcktqum\"]},\"id\":\"kkezzikhlyfjhdgq\",\"name\":\"gebdunygaeq\",\"type\":\"db\"}],\"nextLink\":\"atpxl\"}") .toObject(TargetTypeListResult.class); - Assertions.assertEquals("pmuneqsx", model.nextLink()); + Assertions.assertEquals("atpxl", model.nextLink()); } } 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 284096db2152..e37f58e1466b 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 @@ -11,7 +11,7 @@ public final class TargetTypePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TargetTypeProperties model = BinaryData.fromString( - "{\"displayName\":\"xzhemjyh\",\"description\":\"uj\",\"propertiesSchema\":\"t\",\"resourceTypes\":[\"zzwc\",\"lkb\",\"wpfaj\"]}") + "{\"displayName\":\"gvvcnayrhyr\",\"description\":\"xmueed\",\"propertiesSchema\":\"rdvstkwqqtch\",\"resourceTypes\":[\"mfmtdaaygdvw\",\"gpiohgwxrtfudxe\",\"xg\"]}") .toObject(TargetTypeProperties.class); } } 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 66d5c97f6c57..065c1d254532 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 @@ -20,7 +20,7 @@ public final class TargetTypesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"eryekzkdhmeottaw\",\"description\":\"osxw\",\"propertiesSchema\":\"nhjtf\",\"resourceTypes\":[\"dpmiljpn\"]},\"id\":\"nudqllz\",\"name\":\"auzpjlx\",\"type\":\"ehuxiqhzlraym\"}"; + = "{\"properties\":{\"displayName\":\"nmwcpmgu\",\"description\":\"draufactkah\",\"propertiesSchema\":\"v\",\"resourceTypes\":[\"ziuxxpshnee\"]},\"id\":\"lfg\",\"name\":\"lqubkwdlen\",\"type\":\"d\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); TargetType response = manager.targetTypes() - .getWithResponse("imwrzregzgyufu", "rw", com.azure.core.util.Context.NONE) + .getWithResponse("xtdr", "futacoebjvewzc", com.azure.core.util.Context.NONE) .getValue(); } 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 3c53f3394090..cb55c3840761 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 @@ -21,7 +21,7 @@ public final class TargetTypesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"displayName\":\"w\",\"description\":\"evuafpwzyifrk\",\"propertiesSchema\":\"ltxeqip\",\"resourceTypes\":[\"dyimsfay\"]},\"id\":\"pra\",\"name\":\"kj\",\"type\":\"geslabnsmj\"}]}"; + = "{\"value\":[{\"properties\":{\"displayName\":\"rwm\",\"description\":\"vwpklvxwmygdxp\",\"propertiesSchema\":\"qchiszep\",\"resourceTypes\":[\"jcrxgibbdaxcon\",\"ozauorsukokwb\",\"plhlvnuuepzlrp\",\"wzsoldweyuqdunv\"]},\"id\":\"nrwrbiork\",\"name\":\"alywjhhgdn\",\"type\":\"xmsivfomiloxggdu\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,7 +31,7 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.targetTypes().list("zxlskihmxr", "dsajrednwyysh", com.azure.core.util.Context.NONE); + = manager.targetTypes().list("utujba", "pjuohminyfl", com.azure.core.util.Context.NONE); } } 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 f0ee05aeae26..15b146e83a9e 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 @@ -25,7 +25,7 @@ public final class TargetsCreateOrUpdateWithResponseMockTests { @Test public void testCreateOrUpdateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"bvqt\":\"\\\"datavkh\\\"\",\"izjcpeog\":\"\\\"datanarfdlpukhpyrn\\\"\"},\"location\":\"nmg\",\"id\":\"ouxddbhfhpfpazj\",\"name\":\"oywjxhpdulont\",\"type\":\"cnpqwteht\"}"; + = "{\"properties\":{\"hz\":\"\\\"datalstvlzywe\\\"\",\"sfgytguslfead\":\"\\\"datancsdtclusiyp\\\"\",\"isxgfp\":\"\\\"dataygqukyhejh\\\"\"},\"location\":\"olppvksrpqvujz\",\"id\":\"ehtwdwrft\",\"name\":\"wib\",\"type\":\"rcdlbhshfwpr\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -35,18 +35,14 @@ public void testCreateOrUpdateWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Target response = manager.targets() - .createOrUpdateWithResponse("penuy", "bqeqqekewvnqvcd", "guaucmfdjwnla", "punj", "ikczvvitacgxmf", - new TargetInner() - .withProperties( - mapOf("soxhlwntsjgqr", BinaryData.fromBytes("\"dataserxht\"".getBytes(StandardCharsets.UTF_8)), - "nchrszizoyu", BinaryData.fromBytes("\"dataxypruuuy\"".getBytes(StandardCharsets.UTF_8)), - "g", BinaryData.fromBytes("\"datalyetndnbfqygg\"".getBytes(StandardCharsets.UTF_8)), - "trwahzj", BinaryData.fromBytes("\"datalnlg\"".getBytes(StandardCharsets.UTF_8)))) - .withLocation("cftbyrpl"), - com.azure.core.util.Context.NONE) + .createOrUpdateWithResponse("efozbhdms", "l", "zqhof", "rmaequ", "ah", new TargetInner() + .withProperties( + mapOf("nswhcc", BinaryData.fromBytes("\"datacslfaoqzpiyylha\"".getBytes(StandardCharsets.UTF_8)), + "aivwitqscywu", BinaryData.fromBytes("\"dataph\"".getBytes(StandardCharsets.UTF_8)))) + .withLocation("woluhczbwemhair"), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("nmg", response.location()); + Assertions.assertEquals("olppvksrpqvujz", 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 7c36d4b6433a..c0b2bfa1f255 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 @@ -28,7 +28,7 @@ public void testDeleteWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.targets() - .deleteWithResponse("evrh", "ljyoogwx", "nsduugwbsre", "rfqkfuar", "nlvhhtklnvnafvv", + .deleteWithResponse("cstwity", "hevxcced", "pnmdyodnwzxltjcv", "hlt", "ugcxnavvwxq", 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 aa12d7b36c3d..00bdfe860d07 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 @@ -21,7 +21,7 @@ public final class TargetsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"sysidfvclglxnf\":\"\\\"datajk\\\"\"},\"location\":\"jtkbusqogsfika\",\"id\":\"ansharujtjiqxfz\",\"name\":\"j\",\"type\":\"ttvwkpqh\"}"; + = "{\"properties\":{\"r\":\"\\\"datahpagm\\\"\",\"kkze\":\"\\\"datakdsnfdsdoakgtdl\\\"\",\"sdsttwvog\":\"\\\"datadlhewp\\\"\",\"akufgmjz\":\"\\\"databbejdcngqqm\\\"\"},\"location\":\"rdgrtw\",\"id\":\"nuuzkopbm\",\"name\":\"nrfdw\",\"type\":\"yuhhziu\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,10 +31,10 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Target response = manager.targets() - .getWithResponse("razftxejwabmdujt", "vcopex", "m", "urbuhhlkyqltq", "rogtuwkf", + .getWithResponse("mrv", "xztvbtqgsfraoyzk", "owtlmnguxawqald", "yuuximerqfobwyzn", "bykutw", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("jtkbusqogsfika", response.location()); + Assertions.assertEquals("rdgrtw", 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 d71238e9b4bd..4f194dda8712 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 @@ -22,7 +22,7 @@ public final class TargetsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"qecrqctmxx\":\"\\\"dataninvudbchaqdt\\\"\"},\"location\":\"ddm\",\"id\":\"huytxzvtzn\",\"name\":\"pxbannovvoxc\",\"type\":\"ytprwnwvroev\"}]}"; + = "{\"value\":[{\"properties\":{\"ibdeibq\":\"\\\"datahkr\\\"\",\"kghv\":\"\\\"datap\\\"\",\"pjorwkqnyhg\":\"\\\"datandzwmkrefa\\\"\",\"jivfxzsjabib\":\"\\\"dataij\\\"\"},\"location\":\"stawfsdjpvkv\",\"id\":\"jxbkzbzkdvn\",\"name\":\"jabudurgkakmo\",\"type\":\"zhjjklffhmouwq\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,8 +32,8 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.targets() - .list("yfedevjbo", "lcqxypokk", "minqcym", "zng", "bdxxe", com.azure.core.util.Context.NONE); + .list("byqunyow", "wlmdjrkv", "g", "vfvpdbodaciz", "j", com.azure.core.util.Context.NONE); - Assertions.assertEquals("ddm", response.iterator().next().location()); + Assertions.assertEquals("stawfsdjpvkv", 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 cd5990a3e1be..370cda4dac5e 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,8 +10,9 @@ public final class UserAssignedIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - UserAssignedIdentity model = BinaryData.fromString("{\"principalId\":\"tko\",\"clientId\":\"kouknvudwtiu\"}") - .toObject(UserAssignedIdentity.class); + UserAssignedIdentity model + = BinaryData.fromString("{\"principalId\":\"svexcsonpclhoco\",\"clientId\":\"lkevle\"}") + .toObject(UserAssignedIdentity.class); } @org.junit.jupiter.api.Test diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspaceInnerTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspaceInnerTests.java deleted file mode 100644 index cc0dfb2eb0c2..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspaceInnerTests.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.chaos.fluent.models.WorkspaceInner; -import com.azure.resourcemanager.chaos.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.chaos.models.ResourceIdentity; -import com.azure.resourcemanager.chaos.models.UserAssignedIdentity; -import com.azure.resourcemanager.chaos.models.WorkspaceProperties; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class WorkspaceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkspaceInner model = BinaryData.fromString( - "{\"identity\":{\"principalId\":\"qhlwigdivbkbxgo\",\"tenantId\":\"ajuwas\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"imsidxasicddyvvj\":{\"principalId\":\"y\",\"clientId\":\"uxakjsqzhzbezk\"},\"qgatjeaahhvjhhn\":{\"principalId\":\"gfmo\",\"clientId\":\"ah\"}}},\"properties\":{\"provisioningState\":\"Creating\",\"communicationEndpoint\":\"bbjjidjksyxk\",\"scopes\":[\"vxevblb\",\"ednljl\",\"geuaulx\",\"nsmjbnkppxynen\"]},\"location\":\"vxei\",\"tags\":{\"ckt\":\"wklnsrmffeyc\",\"kk\":\"iymerteeammxqi\"},\"id\":\"zddrt\",\"name\":\"g\",\"type\":\"ojbmxv\"}") - .toObject(WorkspaceInner.class); - Assertions.assertEquals("vxei", model.location()); - Assertions.assertEquals("wklnsrmffeyc", model.tags().get("ckt")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("vxevblb", model.properties().scopes().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkspaceInner model = new WorkspaceInner().withLocation("vxei") - .withTags(mapOf("ckt", "wklnsrmffeyc", "kk", "iymerteeammxqi")) - .withIdentity(new ResourceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("imsidxasicddyvvj", new UserAssignedIdentity(), "qgatjeaahhvjhhn", - new UserAssignedIdentity()))) - .withProperties( - new WorkspaceProperties().withScopes(Arrays.asList("vxevblb", "ednljl", "geuaulx", "nsmjbnkppxynen"))); - model = BinaryData.fromObject(model).toObject(WorkspaceInner.class); - Assertions.assertEquals("vxei", model.location()); - Assertions.assertEquals("wklnsrmffeyc", model.tags().get("ckt")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("vxevblb", model.properties().scopes().get(0)); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspaceListResultTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspaceListResultTests.java deleted file mode 100644 index 45bada44c544..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspaceListResultTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.chaos.implementation.models.WorkspaceListResult; -import com.azure.resourcemanager.chaos.models.ManagedServiceIdentityType; -import org.junit.jupiter.api.Assertions; - -public final class WorkspaceListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkspaceListResult model = BinaryData.fromString( - "{\"value\":[{\"identity\":{\"principalId\":\"ccknfnwmbtmvp\",\"tenantId\":\"jdhttzaefedxi\",\"type\":\"None\",\"userAssignedIdentities\":{\"gtgkylkdghr\":{\"principalId\":\"hk\",\"clientId\":\"rjdqnsdfzp\"},\"fhpfeoajvgcxtx\":{\"principalId\":\"uutlwxezwzhok\",\"clientId\":\"wnhhtqlgehgppip\"},\"txfkfweg\":{\"principalId\":\"sheafid\",\"clientId\":\"ugsresmkssjhoi\"},\"wsldrizetpwbr\":{\"principalId\":\"hpt\",\"clientId\":\"lucbiqtgdqohm\"}}},\"properties\":{\"provisioningState\":\"Succeeded\",\"communicationEndpoint\":\"ibph\",\"scopes\":[\"zmizakakan\",\"jpdn\"]},\"location\":\"ha\",\"tags\":{\"opteecj\":\"lhjlmuoyxprimr\",\"zaum\":\"eislstvasylwx\"},\"id\":\"eoohguufuzboyj\",\"name\":\"thwtzol\",\"type\":\"a\"},{\"identity\":{\"principalId\":\"m\",\"tenantId\":\"mebwjscjpah\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"qcttadijaeukmrsi\":{\"principalId\":\"bfqxnmwmqtibxyi\",\"clientId\":\"dt\"},\"dqmeqwigpibudq\":{\"principalId\":\"kpn\",\"clientId\":\"aapm\"}}},\"properties\":{\"provisioningState\":\"Succeeded\",\"communicationEndpoint\":\"beybpmzznrtffyaq\",\"scopes\":[\"mhh\",\"ioqaqhvs\",\"ufuqyrx\"]},\"location\":\"lcgqlsismj\",\"tags\":{\"ju\":\"ddgamquhiosr\",\"zhczexrxzbujrtrh\":\"vfcdisyirn\"},\"id\":\"vwrevkhgnlnzon\",\"name\":\"lrpiqywnc\",\"type\":\"jtszcof\"},{\"identity\":{\"principalId\":\"htd\",\"tenantId\":\"bjkvreljeamu\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"jerbdkelvidizozs\":{\"principalId\":\"ov\",\"clientId\":\"nashcxlp\"},\"uqj\":{\"principalId\":\"ccxjm\",\"clientId\":\"fdgnwncypuuwwlt\"},\"chxgs\":{\"principalId\":\"zenkeifzzhmkd\",\"clientId\":\"vflyhbxcu\"},\"vacqpbtuodxesz\":{\"principalId\":\"oldforobw\",\"clientId\":\"vizbfhfo\"}}},\"properties\":{\"provisioningState\":\"Deleting\",\"communicationEndpoint\":\"l\",\"scopes\":[\"umuaslzkwrrwoycq\",\"cwyhahno\",\"drkywuhps\"]},\"location\":\"uurutlwexxwlalni\",\"tags\":{\"gdakchz\":\"srzpgepqtybbww\",\"xqnrkcxk\":\"vl\",\"mysu\":\"ibn\"},\"id\":\"swqrntvlwijp\",\"name\":\"ttexoqqpwcyyufmh\",\"type\":\"uncuw\"},{\"identity\":{\"principalId\":\"pkcdqzhlct\",\"tenantId\":\"unqndyfpchrqb\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"r\":{\"principalId\":\"gegydcwboxjum\",\"clientId\":\"qoli\"},\"rzpasccbiuimzdly\":{\"principalId\":\"iouaubrjt\",\"clientId\":\"qxfuojrngif\"},\"pctf\":{\"principalId\":\"fqwmkyoquf\",\"clientId\":\"ruzslzoj\"},\"i\":{\"principalId\":\"dxotng\",\"clientId\":\"gugey\"}}},\"properties\":{\"provisioningState\":\"Running\",\"communicationEndpoint\":\"yui\",\"scopes\":[\"bsnmfpph\",\"jee\"]},\"location\":\"hyhsgzfczbg\",\"tags\":{\"i\":\"gbeglqgleo\",\"eebtijvacvb\":\"etnluankrrfx\"},\"id\":\"qzbqqxlajrnwxa\",\"name\":\"evehjkuyxoaf\",\"type\":\"aoqltfaey\"}],\"nextLink\":\"nm\"}") - .toObject(WorkspaceListResult.class); - Assertions.assertEquals("ha", model.value().get(0).location()); - Assertions.assertEquals("lhjlmuoyxprimr", model.value().get(0).tags().get("opteecj")); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.value().get(0).identity().type()); - Assertions.assertEquals("zmizakakan", model.value().get(0).properties().scopes().get(0)); - Assertions.assertEquals("nm", model.nextLink()); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspacePropertiesTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspacePropertiesTests.java deleted file mode 100644 index 3c00dc0ca2d7..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspacePropertiesTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.chaos.models.WorkspaceProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class WorkspacePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkspaceProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Succeeded\",\"communicationEndpoint\":\"fdeesvecuijpxtx\",\"scopes\":[\"wprtu\",\"wsawddjibabxvi\",\"itvtzeexavo\"]}") - .toObject(WorkspaceProperties.class); - Assertions.assertEquals("wprtu", model.scopes().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkspaceProperties model - = new WorkspaceProperties().withScopes(Arrays.asList("wprtu", "wsawddjibabxvi", "itvtzeexavo")); - model = BinaryData.fromObject(model).toObject(WorkspaceProperties.class); - Assertions.assertEquals("wprtu", model.scopes().get(0)); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspaceUpdateTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspaceUpdateTests.java deleted file mode 100644 index 959174535a37..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspaceUpdateTests.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.chaos.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.chaos.models.ResourceIdentity; -import com.azure.resourcemanager.chaos.models.UserAssignedIdentity; -import com.azure.resourcemanager.chaos.models.WorkspaceUpdate; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class WorkspaceUpdateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkspaceUpdate model = BinaryData.fromString( - "{\"tags\":{\"gsfjac\":\"glecdmdqbwpypq\",\"d\":\"slhhxudbxv\",\"ud\":\"tnsi\"},\"identity\":{\"principalId\":\"mes\",\"tenantId\":\"dlpagzrcxfail\",\"type\":\"None\",\"userAssignedIdentities\":{\"cc\":{\"principalId\":\"dboxdfgsftufqobr\",\"clientId\":\"nac\"},\"tnrzvuljra\":{\"principalId\":\"nhxk\",\"clientId\":\"v\"},\"a\":{\"principalId\":\"rano\",\"clientId\":\"gukkjqnvbroy\"},\"rwhryvycytd\":{\"principalId\":\"ulcdisdosf\",\"clientId\":\"jsvg\"}}}}") - .toObject(WorkspaceUpdate.class); - Assertions.assertEquals("glecdmdqbwpypq", model.tags().get("gsfjac")); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.identity().type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkspaceUpdate model - = new WorkspaceUpdate().withTags(mapOf("gsfjac", "glecdmdqbwpypq", "d", "slhhxudbxv", "ud", "tnsi")) - .withIdentity(new ResourceIdentity().withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities( - mapOf("cc", new UserAssignedIdentity(), "tnrzvuljra", new UserAssignedIdentity(), "a", - new UserAssignedIdentity(), "rwhryvycytd", new UserAssignedIdentity()))); - model = BinaryData.fromObject(model).toObject(WorkspaceUpdate.class); - Assertions.assertEquals("glecdmdqbwpypq", model.tags().get("gsfjac")); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.identity().type()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspacesCreateOrUpdateMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspacesCreateOrUpdateMockTests.java deleted file mode 100644 index f557a692b4b2..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspacesCreateOrUpdateMockTests.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.chaos.ChaosManager; -import com.azure.resourcemanager.chaos.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.chaos.models.ResourceIdentity; -import com.azure.resourcemanager.chaos.models.UserAssignedIdentity; -import com.azure.resourcemanager.chaos.models.Workspace; -import com.azure.resourcemanager.chaos.models.WorkspaceProperties; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkspacesCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"identity\":{\"principalId\":\"cpwzv\",\"tenantId\":\"oksqdt\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"nepubdpkxyqvgx\":{\"principalId\":\"lboncqbazqicqc\",\"clientId\":\"gtvxbyj\"},\"ifmcwnosbzlehg\":{\"principalId\":\"od\",\"clientId\":\"vohkxdxuws\"},\"lszerqzevx\":{\"principalId\":\"kb\",\"clientId\":\"njolgjyyxpv\"},\"afjrqpjiyrqjcrg\":{\"principalId\":\"eintxwaljglzobl\",\"clientId\":\"aafrqulhmzyqbhd\"}}},\"properties\":{\"provisioningState\":\"Succeeded\",\"communicationEndpoint\":\"z\",\"scopes\":[\"fkb\",\"rzorp\",\"ltbqctqjfgxxsaet\",\"zdgvpyigdaqqilz\"]},\"location\":\"d\",\"tags\":{\"gilfjqqacdmkxw\":\"oedxngucaifpaurw\",\"z\":\"dcvjwc\"},\"id\":\"akeciqchx\",\"name\":\"tuicds\",\"type\":\"wdfmmpzhzzwvywr\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ChaosManager manager = ChaosManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - Workspace response = manager.workspaces() - .define("lbnwtpcpahp") - .withRegion("nbagnchj") - .withExistingResourceGroup("atvlmbjwcolbm") - .withProperties( - new WorkspaceProperties().withScopes(Arrays.asList("ikxkxhneg", "njzrbhtmeplvu", "aobrlbp"))) - .withTags(mapOf("xcgqtagdrclsso", "muowakywalhjy", "gjco", "jomevtfycnlb", "ji", "kk")) - .withIdentity(new ResourceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("o", new UserAssignedIdentity()))) - .create(); - - Assertions.assertEquals("d", response.location()); - Assertions.assertEquals("oedxngucaifpaurw", response.tags().get("gilfjqqacdmkxw")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, response.identity().type()); - Assertions.assertEquals("fkb", response.properties().scopes().get(0)); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspacesGetByResourceGroupWithResponseMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspacesGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index 87550df79756..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspacesGetByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.chaos.ChaosManager; -import com.azure.resourcemanager.chaos.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.chaos.models.Workspace; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkspacesGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - String responseStr - = "{\"identity\":{\"principalId\":\"rcssbzhddubbnq\",\"tenantId\":\"lhkalehpavawugi\",\"type\":\"None\",\"userAssignedIdentities\":{\"tp\":{\"principalId\":\"gqgdminictteajoh\",\"clientId\":\"gspnbonhpczykm\"},\"zulo\":{\"principalId\":\"xqcsehch\",\"clientId\":\"ufmpqumqyjgy\"},\"jclid\":{\"principalId\":\"aeuzanh\",\"clientId\":\"nhsenwphpzfng\"},\"fwbeqrkuorh\":{\"principalId\":\"u\",\"clientId\":\"jj\"}}},\"properties\":{\"provisioningState\":\"Failed\",\"communicationEndpoint\":\"uqnmdvhazcvj\",\"scopes\":[\"iqswbqer\"]},\"location\":\"xiytxtdgukvl\",\"tags\":{\"reswmowegmmut\":\"tgdstyouambe\"},\"id\":\"yxey\",\"name\":\"uqi\",\"type\":\"ijiitns\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ChaosManager manager = ChaosManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - Workspace response = manager.workspaces() - .getByResourceGroupWithResponse("wagltbxoeeonqlnf", "myymvqdbpbhfckdv", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("xiytxtdgukvl", response.location()); - Assertions.assertEquals("tgdstyouambe", response.tags().get("reswmowegmmut")); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, response.identity().type()); - Assertions.assertEquals("iqswbqer", response.properties().scopes().get(0)); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspacesListByResourceGroupMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspacesListByResourceGroupMockTests.java deleted file mode 100644 index 7b6519ca39c7..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspacesListByResourceGroupMockTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.chaos.ChaosManager; -import com.azure.resourcemanager.chaos.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.chaos.models.Workspace; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkspacesListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - String responseStr - = "{\"value\":[{\"identity\":{\"principalId\":\"eqfrojs\",\"tenantId\":\"grhydk\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"ygzmxieqvdsmak\":{\"principalId\":\"zsk\",\"clientId\":\"ca\"},\"ybxawoijpodtblx\":{\"principalId\":\"xq\",\"clientId\":\"hyhxa\"}}},\"properties\":{\"provisioningState\":\"Creating\",\"communicationEndpoint\":\"j\",\"scopes\":[\"odqhyk\",\"ncn\",\"emehllizh\"]},\"location\":\"umoqodkad\",\"tags\":{\"xwhydtluvv\":\"ibngqladyw\",\"zsn\":\"ds\",\"y\":\"yemlowuowhlxln\",\"mo\":\"mouvbl\"},\"id\":\"zkltrfowtdvrfmv\",\"name\":\"ih\",\"type\":\"vjdrqcrjidhftuk\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ChaosManager manager = ChaosManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PagedIterable response - = manager.workspaces().listByResourceGroup("xlzdesygrijwa", "ufanray", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("umoqodkad", response.iterator().next().location()); - Assertions.assertEquals("ibngqladyw", response.iterator().next().tags().get("xwhydtluvv")); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, response.iterator().next().identity().type()); - Assertions.assertEquals("odqhyk", response.iterator().next().properties().scopes().get(0)); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspacesListMockTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspacesListMockTests.java deleted file mode 100644 index 77a8fb7faa2d..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/WorkspacesListMockTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.chaos.ChaosManager; -import com.azure.resourcemanager.chaos.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.chaos.models.Workspace; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkspacesListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"identity\":{\"principalId\":\"bfqz\",\"tenantId\":\"fnjyix\",\"type\":\"None\",\"userAssignedIdentities\":{\"fxonjtpusllywp\":{\"principalId\":\"tqxmbj\",\"clientId\":\"umzznvalqjrhuz\"},\"uygdjboqgr\":{\"principalId\":\"iotzbpdbollgryfq\",\"clientId\":\"asigrowsocne\"},\"kxiidisczskoswo\":{\"principalId\":\"qjkqevadrmmwi\",\"clientId\":\"wvcmj\"}}},\"properties\":{\"provisioningState\":\"Updating\",\"communicationEndpoint\":\"zugamxzkrrcoiis\",\"scopes\":[\"mnppccekuztd\",\"bezaxyfukzxuiz\"]},\"location\":\"hnepkpeti\",\"tags\":{\"v\":\"qiubxdukecpxda\",\"dblnsntrp\":\"hctmmkosz\",\"fmhklbnld\":\"aqkiofkb\",\"hez\":\"vcb\"},\"id\":\"quwusq\",\"name\":\"utrpbr\",\"type\":\"uyu\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ChaosManager manager = ChaosManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PagedIterable response = manager.workspaces().list("hdxlw", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("hnepkpeti", response.iterator().next().location()); - Assertions.assertEquals("qiubxdukecpxda", response.iterator().next().tags().get("v")); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, response.iterator().next().identity().type()); - Assertions.assertEquals("mnppccekuztd", response.iterator().next().properties().scopes().get(0)); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ZoneResolutionInfoTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ZoneResolutionInfoTests.java deleted file mode 100644 index deaec426a5f6..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ZoneResolutionInfoTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.chaos.models.ZoneResolutionInfo; - -public final class ZoneResolutionInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ZoneResolutionInfo model = BinaryData.fromString( - "{\"mode\":\"logical\",\"requestedPhysicalZones\":[\"srxuzvoam\",\"tcqiosmg\",\"zah\"],\"subscriptionZoneMappings\":[{\"subscriptionId\":\"qdlyrtl\",\"zoneMappings\":[{\"physicalZone\":\"ap\",\"logicalZone\":\"ltzkatbhjmznnb\"},{\"physicalZone\":\"oqeq\",\"logicalZone\":\"larvlagunbtg\"}]},{\"subscriptionId\":\"ebwlnbmhyreeudzq\",\"zoneMappings\":[{\"physicalZone\":\"bpdqmjxlyy\",\"logicalZone\":\"glgou\"},{\"physicalZone\":\"tlmj\",\"logicalZone\":\"yuojqtobaxk\"},{\"physicalZone\":\"eytu\",\"logicalZone\":\"lbfjkwr\"},{\"physicalZone\":\"snkq\",\"logicalZone\":\"hsyrqunj\"}]},{\"subscriptionId\":\"hdenxaulk\",\"zoneMappings\":[{\"physicalZone\":\"kdk\",\"logicalZone\":\"fmjnnawtqa\"},{\"physicalZone\":\"pxuckpggq\",\"logicalZone\":\"wey\"},{\"physicalZone\":\"rdhlis\",\"logicalZone\":\"gwflq\"},{\"physicalZone\":\"mpizru\",\"logicalZone\":\"n\"}]},{\"subscriptionId\":\"qxpxiwfcngjsaa\",\"zoneMappings\":[{\"physicalZone\":\"ixtmkzjvkviirhgf\",\"logicalZone\":\"rwsdp\"},{\"physicalZone\":\"ra\",\"logicalZone\":\"zvzbglbyv\"}]}]}") - .toObject(ZoneResolutionInfo.class); - } -} diff --git a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ZoneResolutionMappingTests.java b/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ZoneResolutionMappingTests.java deleted file mode 100644 index ed0caf6efdc1..000000000000 --- a/sdk/chaos/azure-resourcemanager-chaos/src/test/java/com/azure/resourcemanager/chaos/generated/ZoneResolutionMappingTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.chaos.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.chaos.models.ZoneResolutionMapping; - -public final class ZoneResolutionMappingTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ZoneResolutionMapping model = BinaryData.fromString( - "{\"subscriptionId\":\"ctctbrxkjz\",\"zoneMappings\":[{\"physicalZone\":\"gxffmshkwf\",\"logicalZone\":\"kgozxwop\"},{\"physicalZone\":\"bydpizqaclnapxb\",\"logicalZone\":\"yg\"},{\"physicalZone\":\"ugjknf\",\"logicalZone\":\"mfcttux\"}]}") - .toObject(ZoneResolutionMapping.class); - } -}